Help with CGHeadMaster
Posted: Mon May 23, 2016 6:26 pm
I am trying to consolidate / clean up the head section of a few websites by using the CGHeadMaster module.
In a previous website, I used this to create the TITLES
Unfortunately this no longer works in CMSMS 2.0.
Before trying to use CGHeadMaster, I tried adding :-
but this doesn't work
The top of the template looks like this :-
I can't seem to capture the {$year} & {$mediatypes} like I did before, so I have decided to use CGHeadMaster instead.
So far, without success :-
In my page template :-
I can't even get this to work
Never mind this :-
What am I doing wrong ?
In a previous website, I used this to create the TITLES
Code: Select all
{capture assign='titledescription'}{title} {if isset($workpage)}- {$year} | {foreach from=$mediatypes item='specifications' name="media"}{$specifications}{if $smarty.foreach.media.last} {else}, {/if}{/foreach}{else} | {sitename}{/if} - {if !isset($workpage)}{global_content name='strap'}{else}{sitename}{/if} {/capture}
{if $page_alias == 'home'}
<title>{sitename} - {global_content name='strap'}</title>
{else}
<title>{$titledescription}</title>
{/if}
Before trying to use CGHeadMaster, I tried adding :-
Code: Select all
{$titledescription=$titledescription scope=global}
The top of the template looks like this :-
Code: Select all
{strip}
{content assign="capturedcontent"}
{$theme_path = "{uploads_url}/cp/"}
{cms_selflink dir='previous' assign='prev_page'}
{cms_selflink dir='next' assign='next_page'}
{share_data scope=global vars='theme_path,capturedcontent,prev_page,next_page,year' }
{process_pagedata}
{/strip}
So far, without success :-
In my page template :-
I can't even get this to work
Code: Select all
{if isset($workpage)}
{cghm_config_set key='title' val={$year} }
or
{cghm_config_set key='title' val=$year }
or
{cghm_config_set key='title' val='$year' }
{/if}
Code: Select all
{cghm_config_set key='title' val='{title} {if isset($workpage)}- {$year} | {foreach from=$mediatypes item='specifications' name="media"}{$specifications}{if $smarty.foreach.media.last} {else}, {/if}{/foreach}{else} | {sitename}{/if} - {if !isset($workpage)}{global_content name='strap'}{else}{sitename}{/if}'