Template Tags
At the most basic level, templating with Bloqs is nothing more than the standard EE tag pair/tag process. But tag pairs in Bloqs go a bit deeper than what you might normally expect to encounter in ExpressionEngine. Let's take a look at an example so you can see how the logic plays out.
Lets say we have a single bloq type defined with 2 atoms:
Bloq Name: Content Bloq
Bloq Short Name:
{content_bloq}
Bloq Atom Definitions:
Atom Name: Heading
Atom Short Name:
{heading}
Atom Name: Body Content
Atom Short Name:
{body_content}
And this bloq type is added to a Bloqs custom field assigned to the Pages channel.
Field Type: Bloqs
Field Name: My Bloqs Field
Field Short Name:
{my_bloqs_field}
Selected Bloq Types: Content Bloq
Given our base definitions, to output the content in a Pages Channel Entry, your template code would look similar to the following:
A slight more advanced example including a Feature Component bloq:
Last updated
Was this helpful?