Support Forums

Modify Page Titles For Individual Ads

This is a discussion on Modify Page Titles For Individual Ads within the v3.1 Modules & Modifications forums, part of the Legacy Help & Support category; I would like to modify the default behaviour for the page title. I would like to have the pages for ...


Go Back   68 Classifieds Forums > Archives > Legacy Help & Support > v3.1 Modules & Modifications

 
 
Thread Tools Display Modes
Old 11-15-2006, 01:46 AM   #1
Senior Member
 
bgordon's Avatar
 
Join Date: Aug 2006
Location: Georgian Bay, Ontario Canada
Posts: 170
Rep Power: 17
bgordon is on a distinguished road
Question Modify Page Titles For Individual Ads

I would like to modify the default behaviour for the page title.

I would like to have the pages for ads (listings) appear as only the Title of the Ad and the Price. I want to strip the site name from the title of these pages.

My Site.com : Ad Title Here

Would become: For Sale By Owner: Ad Title Here - Price Here

Where and how do I make this modification to the php?

Thanks gurus!
__________________
B. Gordon
v.4.0.9 Developer
bgordon is offline  
Old 11-15-2006, 10:38 AM   #2
Coder
 
Join Date: Mar 2006
Posts: 4,881
Rep Power: 119
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 bgordon
I would like to modify the default behaviour for the page title.

I would like to have the pages for ads (listings) appear as only the Title of the Ad and the Price. I want to strip the site name from the title of these pages.

My Site.com : Ad Title Here

Would become: For Sale By Owner: Ad Title Here - Price Here

Where and how do I make this modification to the php?

Thanks gurus!
This can probably all be done at the template level and probably the best place to do it for simplicities sake.

Where does the "for sale by owner" part above come from in how you would like page title to appear?

Id prolly do something like this...

Code:
<title>
{if $body=="viewlisting.tpl.php"}
	{$listingtitle} - {$listingprice}
{else}
{$title}
{/if}
</title>
use the above code in your layout.tpl.php file in the title portion of course. Is this what your looking for? You can add text anywhere in the line after the if to fill it out more if you like or add other variables etc. Also if your using viewlisting2.tol.php use that in the 1f body equals line.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 11-18-2006, 03:19 PM   #3
civ
Senior Member
 
civ's Avatar
 
Join Date: Mar 2006
Location: Greer, SC
Posts: 601
Rep Power: 28
civ will become famous soon enough
Default

Keep in mind too that the same sort of thing can be done for meta tags - we are doing something similar with meta keywords and meta description for our individual listings.
civ is offline  
Old 11-18-2006, 05:10 PM   #4
Senior Member
 
bgordon's Avatar
 
Join Date: Aug 2006
Location: Georgian Bay, Ontario Canada
Posts: 170
Rep Power: 17
bgordon is on a distinguished road
Default

Quote:
Originally Posted by civ
Keep in mind too that the same sort of thing can be done for meta tags - we are doing something similar with meta keywords and meta description for our individual listings.
Are you using the if template check or if pagetitle check to modify the keywords and other tags?

This is a great idea. I will get started on modding the templates for that now. I fixed up the titles on all the key pages now and can actually track what people are lookng at and staying on for longer now that the pages are identifiable.

Thanks...

PS: I have modded so much of the site, I am scared to upgrade the site for fear of losing track and messing it up. I better started keeping a log of what I do to where...
__________________
B. Gordon
v.4.0.9 Developer
bgordon is offline  
Old 11-24-2006, 02:30 PM   #5
civ
Senior Member
 
civ's Avatar
 
Join Date: Mar 2006
Location: Greer, SC
Posts: 601
Rep Power: 28
civ will become famous soon enough
Default

I recommend checking for the body template like Larry is doing above - that seems to be the most foolproof method for us too.

You should grab a copy of BeyondCompare to use when upgrading - I wouldn't think of tackling an upgrade without it.
civ is offline  
Old 11-24-2006, 04:37 PM   #6
Coder
 
Join Date: Mar 2006
Posts: 4,881
Rep Power: 119
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 bgordon
Are you using the if template check or if pagetitle check to modify the keywords and other tags?

This is a great idea. I will get started on modding the templates for that now. I fixed up the titles on all the key pages now and can actually track what people are lookng at and staying on for longer now that the pages are identifiable.

Thanks...

PS: I have modded so much of the site, I am scared to upgrade the site for fear of losing track and messing it up. I better started keeping a log of what I do to where...
Im just checking to see what template is being called. If the viewlisting template is being used that means a specific ad is being looked at and thus display the ads title and price in place of the default site title tile.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove domain name infront of page titles BigOrange v3.1 Questions & Support 3 11-09-2006 03:49 PM
Page titles martini55 v3.1 Questions & Support 1 08-14-2006 01:08 PM


All times are GMT -4. The time now is 06:32 AM.


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