You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
I think it could be useful to look for properties and content of blocks too.
In particular I'm referring to:
the parent block if any (maybe fallback to current page title and properties otherwise?)
Previous/next sibling block
An use case for 1. could be:
You are in a page/block about an Author and you want to use a "New Book" template to create a Book that has page title/block content as the value of author:: property:
- Name Surname
- Title of the book created with a template
author:: Name Surname
The text was updated successfully, but these errors were encountered:
Hi, @alxlg! I know, you are aware of 🏛 Full House Templates plugin. Just left here an instruction on how to achieve some of the described parts for others who come here.
There are context info about block you are rendered template in:
the block itself: c.block
the page of the block: c.block.page
parent block: c.block.parentBlock (supported at a minimal level: only id field)
prev sibling block: c.block.prevBlock (supported at a minimal level: only id field)
next sibling block is not supported now
children blocks: c.block.children — is not supported now
- ``{ c.args.title || 'Title of the book created with a template' }``
template:: new book
template-including-parent:: yes
author:: ``{ ref(empty(c.args.author, c.page.name)) }``
Render it in [[Name Surname]] page in one of following ways:
{{renderer :template, new book}}
{{renderer :template, new book, :title "Book Title"}}
{{renderer :template, new book, :author Some Author}}
Demo
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I think it could be useful to look for properties and content of blocks too.
In particular I'm referring to:
An use case for 1. could be:
You are in a page/block about an Author and you want to use a "New Book" template to create a Book that has page title/block content as the value of author:: property:
The text was updated successfully, but these errors were encountered: