CMSMS 1.11 - News custom fields syntax has changed
Posted: Sun Aug 05, 2012 8:20 pm
Hi,
If you have written customized templates for the news module with CMSMS 1.10.3, you may be interested by this post.
It took me some time to figure out why my news page had some elements missing after I upgraded to 1.11, and here is the solution to this issue.
It deals with the display of custom field in summary template.
In CMSMS 10.0.3 you could write if you have a custom field named "header_image"
In CMSMS 1.11, in a summary template, this does not work anymore (no "header_image" field is defined in $entry). You have to write instead:
In the detail template, on the other hand, both syntaxes are still working.
Enjoy!
If you have written customized templates for the news module with CMSMS 1.10.3, you may be interested by this post.
It took me some time to figure out why my news page had some elements missing after I upgraded to 1.11, and here is the solution to this issue.

It deals with the display of custom field in summary template.
In CMSMS 10.0.3 you could write if you have a custom field named "header_image"
Code: Select all
{if $entry->header_image}
<img class="header-image" src="{$entry->file_location}/{$entry->header_image}"/>
{/if}
Code: Select all
{if $entry->fields.header_image->value}
<img class="header-image" src="{$entry->file_location}/{$entry->fields.header_image->value}"/>
{/if}
Enjoy!