#metaA work-in-progress library of generally useful templates for rendering queries.-- Renders a page object as a linked list item
templates.pageItem = template.new([==[
* [[${name}]]
]==])
-- Renders a page object as a linked list item with full path
templates.fullPageItem = template.new([==[
* [[${name}|${name}]]
]==])
-- Renders a task object as a togglable task
templates.taskItem = template.new([==[
* [${state}] [[${ref}]] ${name}
]==])
-- Renders an item object
templates.itemItem = template.new([==[
* ${name}
]==])
-- Renders a paragraph object
templates.paragraphItem = template.new([==[
* [[${ref}]]
]==])
Examples
template.pageItem:
${template.each(query[[from index.tag "page" limit 3]], templates.pageItem)}template.taskItem:${template.each(query[[from index.tag "task" where page == _CTX.currentPage.name]], templates.taskItem)}template.itemItem:${template.each(query[[from index.tag "item" where page == _CTX.currentPage.name]], templates.itemItem)}