Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
Hi,
if I have a a template with clonable fields.
Is there a possibility to have on the same template also not cloned fields?

Cheers
Template globals viewtopic.php?f=5&t=11105
Thank you verymuch. Globals are cool!
Hello, how we use template globals for a generic include like page header? Let's say that I have SEO tags defined in site global variables, how can I be able to override them if I have template globals specific tags? This is my generic head include code but I couldn't get template globals into it (cloned pages' specific tags appear fine):
Code: Select all
<head>
    <cms:if "<cms:not_empty page_title />"><cms:if page_title=='' /><title><cms:show page_title /></title>
<cms:else />
<title><cms:get_custom_field 'global_meta_page_title' masterpage='globals.php' /> - <cms:show k_page_title /></title>
</cms:if>
@gali
Assuming the name of the field is -
'page_title' in clonable template
'meta_page_title' in 'template global'
'global_meta_page_title' in 'globals.php'

you may use the following code to first use the value in clonable, then template global and finally globals.php -
Code: Select all
<cms:set my_title = page_title />
<cms:if my_title eq ''>
    <cms:set my_title = "<cms:get_global 'meta_page_title' />" />
</cms:if>
<cms:if my_title eq ''>   
    <cms:set my_title = "<cms:get_field 'global_meta_page_title' masterpage='globals.php' />" />
</cms:if>

<title><cms:show my_title /></title>   

Hope this helps.
5 posts Page 1 of 1
cron