I have the need for specific meta descriptions for each of my pages for the CGBlog pages.
I have created a new public field called description.
When referencing this in the template to check if all text inputs are displaying correctly, it works, with the statement
Code: Select all
{if isset($entry->fields)}
{foreach $entry->fields as $field}
<div class="CGBlogDetailField">
{if $field->type == 'image'}
<img src="{$entry->file_location}/{$field->value}"/>
{else}
<p>{$field->value}</p>
{/if}
</div>
{/foreach}
{/if}
Code: Select all
{assign var="description" value=$field->description|escape scope=global}
Code: Select all
{if isset($description)}
<meta name="description" content="{$description}">
{else}
<meta name="description" content="Insert regular meta desc here...">
{/if}
Ta,
Jake