Can a template id include cms:show command to inculde data from another template id:
The file is a template called SERVICES, the page includes cms:pages to get a file which is also a template and comes with an id" template/temp_block_services.php' id='2'><!-- CREATE DYNAMIC LINK -->"
but does not work. Also can php be used to choose the label or id result. eg. php looking up a varible to see if it contains the word electrical and then giving a set out put as a response: eg.
or is the a better way of doing all this? thank you.
- Code: Select all
<?php include($_SERVER['DOCUMENT_ROOT'].'/acc/cms.php' ); ?>
<!-- Template Details -->
<cms:template title='Services' clonable='1' commentable='0'>
<!-- Folders -->
<cms:folder title="Electrician" name="electrician" />
<cms:folder title="Electrical Certification" name="electrical_certification" />
<cms:folder title="Plumber" name="plumber" />
<cms:folder title="Gas Certification"name="gas_certification" />
<cms:folder title="Audio & Video" name="audio_video" />
<cms:folder title="Security Systems" name="security_systems" />
<cms:folder title="Water" name="water" />
<cms:folder title="Air Purification" name="air_purification" />
<cms:folder title="Natural Homes" name="natural_homes" />
<!-- Main Content -->
<cms:editable label='Page image' name='page_image' crop='1' width='900' height='221' type='image' />
<cms:editable label='Page subtitle' name='page_subtitle' type='text' />
<cms:editable label='Subtitle' name='content_subtitle' type='text' />
<cms:editable label='Heading' name='content_heading' type='text' />
<cms:editable label='Introduction' name='introduction' type='textarea' height='100'/>
<cms:editable label='Content' name='main_content' type='textarea' />
<!-- SEO -->
<cms:editable label='SEO1' name='hidden_Seo_1' type='textarea' />
<cms:editable label='SEO2 Title' name='hidden_Seo_2_title' type='text' > Available service in the following areas </cms:editable>
<cms:editable label='SEO2 Text' name='hidden_Seo_2_text' type='textarea' height='100' />
<cms:editable label='SEO2 Title 1' name='hidden_Seo_2_title1' type='text' > London </cms:editable>
<cms:editable label='SEO2 List 1' name='hidden_Seo_2_block1' type='richtext' > <!--6 Hyper Links--> </cms:editable>
<cms:editable label='SEO2 List 2' name='hidden_Seo_2_block2' type='richtext' > <!--6 Hyper Links--> </cms:editable>
<cms:editable label='SEO2 List 3' name='hidden_Seo_2_block3' type='richtext' > <!--6 Hyper Links--> </cms:editable>
<cms:editable label='SEO2 Title 2' name='hidden_Seo_2_title2' type='text' > Hertfordshire </cms:editable>
<cms:editable label='SEO2 List ' name='hidden_Seo_2_block4' type='richtext' > <!--6 Hyper Links--> </cms:editable>
</cms:template>
<header file included here>
<cms:pages masterpage='template/temp_block_services.php' id='2'><!-- CREATE DYNAMIC LINK -->
<div class="bodyblock bbshadowb">
<p class="typotitle_sml"><cms:show service_link_block1_title /></p>
<p class="typosubtitle_sml"><cms:show service_link_block1_subtitle /></p>
<p class="typotext" style="padding-top:16px;">
<ul class="blocklist">
<li><a href="" ><cms:show service_link_block1 /></a></li>
<li class="bodyblockhover_text2"><a href="" ><cms:show service_link_block2 /></a></li>
<li class="bodyblockohver_text3"><a href="" ><cms:show service_link_block3 /></a></li>
<li class="bodyblockhover_text4"><a href="" ><cms:show service_link_block4 /></a></li>
<li class="bodyblockhover_text5"><a href="" ><cms:show service_link_block5 /></a></li>
<li class="bodyblockhover_text6"><a href="" ><cms:show service_link_block6 /></a></li>
<li class="bodyblockhover_text7"><a href="" ><cms:show service_link_block7 /></a></li>
<p> </p>
<li class="bodyblockheader1" id="bodyblockheader1"><img src="<cms:show product_link_block1_image />"></li>
<li id="bodyblock_text2"><img src="<cms:show service_link_block2_image />"></li>
<li id="bodyblock_text3"><img src="<cms:show service_link_block3_image />"></li>
<li id="bodyblock_text4"><img src="<cms:show service_link_block4_image />"></li>
<li id="bodyblock_text5"><img src="<cms:show service_link_block5_image />"></li>
<li id="bodyblock_text6"><img src="<cms:show service_link_block6_image />"></li>
<li id="bodyblock_text7"><img src="<cms:show service_link_block7_image />"></li>
</ul>
</p>
</div>
</cms:pages>
<?php COUCH::invoke(); ?>
The file is a template called SERVICES, the page includes cms:pages to get a file which is also a template and comes with an id" template/temp_block_services.php' id='2'><!-- CREATE DYNAMIC LINK -->"
but does not work. Also can php be used to choose the label or id result. eg. php looking up a varible to see if it contains the word electrical and then giving a set out put as a response: eg.
- Code: Select all
$var_header = strtolower($PageTitle);
$search_for = array('Electrical Services' => array('electrical', 'audio', 'electrician', 'security', 'fire', 'video'), 'Plumbing Service' => array('heating', 'gas', 'plumbing'), 'Air & Water' => array('water', 'air', 'osmosis', 'filtration'));
foreach ($search_for as $name=>$term){
foreach ($term as $findme)
{
if (strpos($var_header,$findme) !== false)
{
ob_start();
echo "".$name;
$var_header_services = ob_get_contents();
ob_end_clean();
}
}
}
or is the a better way of doing all this? thank you.