How to access CMS {content block='XYZ'} from Smarty Tags?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
sloop

How to access CMS {content block='XYZ'} from Smarty Tags?

Post by sloop »

All, I'd like to access the value of a content block (and/or the default block) from a Smarty conditional tag.  I'd like this to work:

Template:
...
{content block='ShowSiteLink'}
...
{if isset($gCms->content_blocks['ShowSiteLink'])}Visit onJavascript{/if}

Can this be done?  I'd like to keep this in the template, rather than a plugin/custom tag, so that template designers can modify it later.

Thanks for any feedback.
Locked

Return to “Layout and Design (CSS & HTML)”