I have uploaded and assigned the custom cats module to certain categories, all works fine. My question is is there any way of creating a seperate <title> tag for this new-showlings.tpl page ? I have tried adding the following {elseif $body=="/ httpdocs / modules / customcats / templates / cattemplates / new-showlistings.tpl" <title>New ### Second hand###</title> But that does not seem to work, just wodered whether anybody had any ideas ? Many thanks Jason
Have you tried this. I don't see why it would not work but have not tried it. $body=="new-showlistings.tpl"
HI David, Yes I tried that first and it never worked, because it is a module I assumed I had to follow the entire directory path. It seems very weird that it does not work Mmmm
I would try some of these: $body == templates/cattemplates/new-showlistings.tpl $body == cattemplates/new-showlistings.tpl $body == new-showlistings.tpl
Do this... Add {debug} to your layout.tpl file and then it should display a popup once you load a page. In the popup window it should say the exact path to the body template.
If searchresult.php TRY this: PHP: $class_tpl->assign('file', 'searchresults.php'); if($settings['sTemplate']==1) { switch (isset($_GET['type'])&& $_GET['type'] == '') { case 3: //category $class_tpl->assign('body',FILESYSTEM_PATH.'modules/customcats/templates/cattemplates/template1.tpl'); break; case 5: //category $class_tpl->assign('body',FILESYSTEM_PATH.'modules/customcats/templates/cattemplates/template2.tpl'); break; default: $class_tpl->assign('body','showlistings.tpl'); break; } $class_tpl->assign('body','showlistings.tpl'); }
As suggested by eric I put the debug in the page to pull out the title and I got this result: "/var/www/vhosts/diy-classifieds.co.uk..." for the $body, so now im stumpted I dont have a clue what this means, does anybody elese know what it means ? (by the way pipelin thanks very much for trying to help me, but that did not work either ) Thanks for any help Jason
Try the full path: {if $body == '/var/www/vhosts/diy-classifieds.co.uk/templates/cattemplates/new-showlistings.tpl'}
Exellent got it sorted as you said eric I needed to use the FULL link which turned out to be (if anyones interested), thanks eric once again. {elseif $body == '/var/www/vhosts/mywebsite.com/httpdocs/modules/customcats/templates/cattemplates/air-tools.tpl'} Just wondering. I have set up about 30 different showlistings templates using erics mod, now I have found the source to adding seperate title tags to each of them, If I put all of them in the layout.tpl head section giving each one different titles, would it have any adverse effect on the website ? ranking, page loading or anything else ? I would use something like {if $body == '/var/www/vhosts/mywebsite.com/httpdocs/modules/customcats/templates/cattemplates/air-tools.tpl'} <title> ####</title> {elseif $body == '/var/www/vhosts/mywebsite.com/httpdocs/modules/customcats/templates/cattemplates/air-tools.tpl'} <title ### </title> and so on ....
sorry forgot to ask, am I able to assign new meta description to each of them aswel please ? Regards Jason
Maybe I am missing it but when you add/edit categories you can define custom title, keywords, and description from there.
sorry eric, Think my brain has gone a bit haywire. of course it does DOH ! I know it is not a question which is related to this topic, but can I ask has anybody made any really big and sucsessful classifieds websites and even turned it in to a full time job (just something i have often wondered
I know we have a few customers that make enough to this full time and seem even have employees to run it. I just can't share any details about the sites.