Forum Discussion

id-chalmers's avatar
10 years ago

Freemarker access to custom content title?

I'd like to include not only the content but the title of my custom content blocks in a custom component. Right now, I bring in the body with something like 

<@component id="common.widget.custom-content" name="5" panel="false"/>

 Thanks!

  • Maybe you can try the rest API, that's how I did it until now (never used the title though):

    inside FreeMarker

    <#assign title = restadmin(someboardnode.@href + "/settings/name/customcontent.1_title").value />

    I'm using restadmin here because I had issues with anonymous users not seeing the custom content...don't now why it's necessary, but restadmin solves it...

2 Replies

  • Maybe you can try the rest API, that's how I did it until now (never used the title though):

    inside FreeMarker

    <#assign title = restadmin(someboardnode.@href + "/settings/name/customcontent.1_title").value />

    I'm using restadmin here because I had issues with anonymous users not seeing the custom content...don't now why it's necessary, but restadmin solves it...