Retrieving Blocks from Composer Fields

Permalink
Hi All

I am hoping you can help me out, I cannot find any documentation anywhere to describe what I am doing. I have a page type 'Project', which I have added some composer fields to by going into Page Types, then Edit Form, most are just custom attributes which I can retrieve fine, however one of them is a Content Block which I have added a custom label called 'Description'.

I am building a custom template and I want to be able to retrieve the content of this block and render it (or just render the block itself) but I cannot find anyway of doing this.

Can anyone point me in the right direction?

Many thanks
David

bvcreative
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi bvcreative,

This link explains how to get and display Content block contents programmatically:
https://www.concrete5.org/community/forums/customizing_c5/how-to-pro...

If you are using multiple Content blocks, all of them will be displayed. This approach does not allow you to grab a specific Content block.

I am wondering if there might be a way to retrieve a specific Content block using the custom label assigned to it in Composer.