Hi
I have having trouble with the SEO meta tags within a clonable template
in my gallery.php which is the clonable template, I am using globals.php to set the title, my gallery.php looks like the following
my header.php in the snippets folder looks like the following
my globals.php looks like the following
on the Global Settings on the admin side of the CMS shows the meta keywords field and the meta description textarea box so have entered them in but on the gallery.php page, it is showing the following when I look at the view source
<meta name="keywords" content="">
<meta name="description" content="">
I don't get where I have gone wrong?
I am determined to get it working but just can't see why the gallery.php is not picking up on the meta tags when I have set them in the globals.php page and made the gallery.php use the globals.php settings?
I have having trouble with the SEO meta tags within a clonable template
in my gallery.php which is the clonable template, I am using globals.php to set the title, my gallery.php looks like the following
- Code: Select all
<?php require_once'cms/cms.php'; ?>
<cms:pages masterpage='globals.php' >
<cms:set g_site_name=site_name 'global' />
</cms:pages>
<cms:template title='Gallery' clonable='1' dynamic_folders='1' gallery='1'>
<cms:editable
name='gg_image'
label='Image'
desc='Upload your main image here'
width='500'
height='500'
show_preview='1'
preview_height='200'
type='image'
/>
<cms:editable
name='gg_thumb'
label='Image Thumbnail'
desc='Thumbnail of the main image above'
width='115'
height='115'
enforce_max='1'
assoc_field='gg_image'
show_preview='1'
type='thumbnail'
/>
<cms:editable
name='my_thumb_2'
label='Image Thumbnail 2'
desc='Second thumbnail of the main image above'
width='100'
height='100'
assoc_field='gg_image'
show_preview='1'
type='thumbnail'
/>
<cms:editable
name='my_desc'
label='Description'
height='60'
type='textarea'
/>
</cms:template>
<title><cms:show g_site_name/></title>
<cms:embed 'header.php' />
<!--CONTENT-->
<div id="column-top">
<div id="gallery-wrapper">
<div id="breadcrumbs">
<cms:breadcrumbs separator=' » ' include_template='1'/><cms:if k_is_page> » <cms:show k_page_title /></cms:if>
</div><!-- breadcrumbs -->
<cms:if k_is_list >
<!-- gallery folders -->
<cms:ignore>
NOTE: A few points to note about the way folders are displayed -
1. We display only the immediate child folders of the current folder (root is also considered a folder).
If the images in the current folder are numerous enough to need pagination, we take care to display the folders
only on the first page.
2. If the folder has an image associated with it (via the 'Manage folders' admin section), that image is used.
If no image is associated, we pick up the first page contained within this folder and use its thumbnail.
Finally if there are no child pages within, we use a default folder icon.
</cms:ignore>
<cms:set my_page="<cms:gpc 'pg' method='get' />" />
<cms:if my_page lt '2' >
<ul class="gallery folders">
<cms:folders childof=k_folder_name hierarchical='1' depth='1'>
<cms:set my_folder_image="" />
<cms:if k_folder_image>
<cms:set my_folder_image=k_folder_image />
<cms:else />
<cms:pages folder=k_folder_name include_subfolders='0' limit='1'>
<cms:set my_folder_image=my_thumb_2 scope='parent' />
</cms:pages>
</cms:if>
<cms:if my_folder_image=''><cms:set my_folder_image="<cms:show k_admin_link />theme/images/empty-folder.gif" /></cms:if>
<li>
<a href="<cms:show k_folder_link />">
<img alt="<cms:show k_folder_title />" src="<cms:show my_folder_image />"/>
<span class="title"><cms:show k_folder_title /></span>
<span class="count_images"><cms:show k_folder_totalpagecount /> images</span>
</a>
</li>
</cms:folders>
</ul>
</cms:if>
<!-- gallery images-->
<ul class="gallery">
<cms:pages folder=k_folder_name include_subfolders='0' limit='18' paginate='1'>
<li>
<a href="<cms:show gg_image />" rel="lightbox-<cms:show k_page_foldername/>" <cms:if my_desc>title="<cms:show my_desc/>"</cms:if>>
<img alt="<cms:show k_page_title />" src="<cms:show my_thumb_2 />"/>
</a>
</li>
<cms:if k_paginated_bottom ><!-- pagination -->
<div style="clear:both"><cms:paginator /></div>
</cms:if>
</cms:pages>
</ul>
<cms:else /><!-- k_is_page -->
<div id="image_container">
<img alt="<cms:show k_page_title />" src="<cms:show gg_image />"/>
</div>
</cms:if>
</div>
<br class="clear" />
</div> <!-- COLUMN TOP-->
<!--CONTENT-->
<div class="clearfooter"></div>
<?php include( 'includes/footer.php' ); ?>
<?php COUCH::invoke(); ?>
my header.php in the snippets folder looks like the following
- Code: Select all
<meta name="keywords" content="<cms:show meta_keywords />">
<meta name="description" content="<cms:show meta_description />">
my globals.php looks like the following
- Code: Select all
<?php require_once ( 'cms/cms.php' ); ?>
<cms:template title='Global Settings' executable='0'>
<cms:editable name='site_name' label='Gallery Page Title' type='text'>Gallery</cms:editable>
<cms:editable name='meta_keywords' label='Meta Keywords - 7-8 max comma separated' type='text' />
<cms:editable name='meta_description' label='Meta Description - 180 words max' type='textarea' />
</cms:template>
<?php COUCH::invoke(); ?>
on the Global Settings on the admin side of the CMS shows the meta keywords field and the meta description textarea box so have entered them in but on the gallery.php page, it is showing the following when I look at the view source
<meta name="keywords" content="">
<meta name="description" content="">
I don't get where I have gone wrong?
I am determined to get it working but just can't see why the gallery.php is not picking up on the meta tags when I have set them in the globals.php page and made the gallery.php use the globals.php settings?