can something like this be done based on urls? "/> title tags - 68 Classifieds Forums

Support Forums

title tags

This is a discussion on title tags within the Modules / Plugins / Modifications forums, part of the Developer Forums category; i get the logic for this: {if $body=='viewlisting.tpl'} <title> Some Amazing title </title> can something like this be done based ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 07-10-2008, 08:00 PM   #1
Member
 
Join Date: Apr 2008
Posts: 51
Rep Power: 15
anna245 is on a distinguished road
Question title tags

i get the logic for this:
{if $body=='viewlisting.tpl'}
<title> Some Amazing title </title>


can something like this be done based on urls? that would be awesome.


{if url=yourwebsite.com/neyworkcityads.html}
<title> New York City Ads </title>
anna245 is offline   Reply With Quote
Old 07-11-2008, 03:38 AM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

Yes but it gets a bit messy. Care is needed and a lot of testing. I think I know what you want to do given your other posts - the goal is to generate unique title, description and keywords meta tags for every page. This is possible. Basically create yourself a metatags.tpl file. Include this in the top of the layout.tpl file.

{include file='metatags.tpl'}


In your metatags.tpl file you start to do a lot of logical tests and build your title, description and keywords on the fly. You test variables like $body, $SCRIPT_NAME, etc to know what page you are dealing with. Specifically I do what you suggest for the searchresults page. I test for the category, the seller, the search text etc for searchresults by looking at the URL. Here is an example from my metatags.tpl,

{if $SCRIPT_NAME == "/searchresults.php"}
{assign var=Seller value=$smarty.get.owner}
{assign var=Text value=$smarty.get.searchtext}
{assign var=Property value=$smarty.get.opt1}
{assign var=Type value=$smarty.get.type}

Then you can use these variable in logical tests and put them in your tags. For example,

{if $Type == 30}{assign var=Type value="south west france"}{/if}

Basically, the number 30 from the URL is south west france. You can then put the variable $TYPE in your metatags. etc.

As I said it is a messy business and you will need to play round a lot and understand what scripts do what and their nuances. The details and logic will be yours. I can share my complete metatags file with you if you like to see how I deal with other scripts like category.php. Just PM me.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline   Reply With Quote
Old 07-12-2008, 08:31 AM   #3
Member
 
Join Date: May 2006
Posts: 45
Rep Power: 22
Kateedyd is on a distinguished road
Default Not Familiar

I had placed a thread elsewhere on this subject and was directed to this thread.
I am wanting to do the exact same thing, but I don't have a clue about all this script testing. (I had my site built by AusCity).
Do you have any suggestions, or should I just hire someone else to do it for me?
Kateedyd is offline   Reply With Quote
Old 07-13-2008, 07:19 PM   #4
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

PM me and tell me what you are wanting to do exactly with your site - it may be straightforward or it may be complicated. It is quite a lot of work to do a complex file to test pages and assign unique title tags and descriptions.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline   Reply With Quote
Reply

Tags
seo , title tags

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling URLs with title tags. seymourjames Modules / Plugins / Modifications 18 07-10-2008 09:17 AM
Category Title Tags anna245 Technical Support 6 06-30-2008 10:44 AM
Title Tag Modifications anna245 Technical Support 0 06-07-2008 12:32 PM
title tags on calling urls seymourjames Technical Support 7 06-01-2008 06:48 PM
Getting title tags with URLs (smarty) seymourjames Modules / Plugins / Modifications 0 04-24-2008 08:39 PM


All times are GMT -4. The time now is 03:12 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0