tags. If you want to override the title of any page that"/> MODIFICATION: Overriding the <title> of certain pages - 68 Classifieds Forums

Support Forums

MODIFICATION: Overriding the <title> of certain pages

This is a discussion on MODIFICATION: Overriding the <title> of certain pages within the Modules / Plugins / Modifications forums, part of the Developer Forums category; Place this code into your layout.tpl template in place of the <title></title> tags. If you want to override the title ...


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

Reply
 
Thread Tools Display Modes
Old 02-28-2008, 12:03 AM   #1
Senior Member
 
cwp's Avatar
 
Join Date: Jun 2007
Posts: 296
Rep Power: 22
cwp is a jewel in the rough
Default MODIFICATION: Overriding the <title> of certain pages

Place this code into your layout.tpl template in place of the <title></title> tags. If you want to override the title of any page that displays the body of "viewlisting2.tpl" then you would put this template into the body=='viewlisting2.tpl' section of the code. I would keep the last title tags as is, as these can be controlled in your administration panel.

Code:
{if $body=='viewlisting2.tpl'}
        <title>{$title}</title>
        {else}
        <title>{$sitetitle}</title>
        {/if}
Credit: Lhotch & Suzkaw
__________________
Version 4.0.3 Developer
cwp is offline   Reply With Quote
Old 02-28-2008, 06:50 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,497
Rep Power: 132
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Thanks for posting these mods. I am sure this will make it easier for people to find that are looking for something similar.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 02-28-2008, 07:21 PM   #3
Senior Member
 
Join Date: Aug 2006
Posts: 122
Rep Power: 21
spaceboy is on a distinguished road
Default

I assume you can add other info to the title this way, like seller's city and state?
__________________
Lindsay

developer v3.1.5 and v4
abletrader.com
spaceboy is offline   Reply With Quote
Old 02-28-2008, 07:42 PM   #4
curmudgeon
 
Join Date: Mar 2006
Posts: 5,351
Rep Power: 134
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by spaceboy
I assume you can add other info to the title this way, like seller's city and state?
As long as the variables are there for the template to use you can display them however you like. You can use the debug console to determine what variables are there. Just keep in mind that variables change depending on the underlying script so you may have to add logic to check that and then perform accordingly.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 02-28-2008, 10:39 PM   #5
Senior Member
 
cwp's Avatar
 
Join Date: Jun 2007
Posts: 296
Rep Power: 22
cwp is a jewel in the rough
Default

Quote:
Originally Posted by spaceboy
I assume you can add other info to the title this way, like seller's city and state?
If you use it for the viewlisting page, or any other page that uses those variables like lhotch said, then yes, as it works for me.
__________________
Version 4.0.3 Developer
cwp is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Overriding the <title> of certain pages? cwp Technical Support 14 08-06-2008 06:33 AM
Personalize pages once logged in. zman78 Templates, HTML, CSS, and Design Help 4 04-01-2006 06:32 PM


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


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