Re: [Zotonic-Dev] Content Blocks

2024-01-15 Thread 'Seann Aswell' via Zotonic developers
{% for blk in m.rsc[id].blocks %} {% optional include ["blocks/_block_view_",blk.type,".tpl"]|join blk=blk id=id %} {% endfor %} Understand, thanks for the correct format. Thanks again, Seann On Monday, January 15, 2024 at 1:42:45 AM UTC-7 Marc Worrell wrote: > Hi Seann, > > I would

Re: [Zotonic-Dev] Content Blocks

2024-01-15 Thread 'Marc Worrell' via Zotonic developers
Hi Seann, I would expect it to be: > {% for blk in id.blocks %} > {% include "blocks/_block_view_text.tpl" %} > {% endfor %} But that renders only blocks of the type ’text’. The suffix _text is the type of the block, we added different templates for the different types. You can see

Re: [Zotonic-Dev] Content Blocks

2024-01-15 Thread 'Seann Aswell' via Zotonic developers
When I use the following, without .title on the end, it works. {% for blk in id.blocks.name %} {% include "blocks/_block_view_text.tpl" %} {% endfor %} If there is a better way, let me know. Else, thanks again. Much appreciated. On Sunday, January 14, 2024 at 3:23:27 AM UTC-7 Marc

Re: [Zotonic-Dev] Content Blocks

2024-01-14 Thread 'Marc Worrell' via Zotonic developers
You can use:id.blocks.name.titleWhere “title” is a property of the block. And name is the name of your block.If your name includes spaces:id.blocks[“name of block”].titleCheers, MarcSent from my iPhoneOn 14 Jan 2024, at 09:32, 'Seann Aswell' via Zotonic developers wrote:Very interesting...So, if

Re: [Zotonic-Dev] Content Blocks

2024-01-14 Thread 'Seann Aswell' via Zotonic developers
Very interesting... So, if I add a Header block called "header1" and a Text block called "text1", are those fields directly addressable using something like "blk.name"? For instance, I see in "_block_view_page_inline.tpl

[Zotonic-Dev] Content Blocks

2024-01-11 Thread 'Seann Aswell' via Zotonic developers
Another question... In the admin there is the option of adding content blocks to resources, which seems really handy. How can I address the additional blocks in HTML? I am obviously missing something, as I do not see any properties defined in m_rsc