Forum Moderators: coopster

Message Too Old, No Replies

Title Tag Reverse

How do I reverse my title order

         

AlvinSA

11:07 am on Jul 29, 2009 (gmt 0)

10+ Year Member



Hi All

The title on my site shows :
"Accommodation ¦ Hotels ¦ Holiday Inn"

Is there a simple way to reverse the order of the title, like:
"Holiday Inn ¦ Hotels ¦ Accommodation"

Thanx in advance

jatar_k

12:07 pm on Jul 29, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



well, you would just edit what is between <title> and </title> on the page that you are trying to change

AlvinSA

12:21 pm on Jul 29, 2009 (gmt 0)

10+ Year Member



Problem is, the title is generated dynamically:
<?php echo $page_title; ?>

Depending on the page it's on, the script follows a breadcrumb, and inserts it into the title. I want to reverse the order the breadcrumb displays.

jatar_k

12:24 pm on Jul 29, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



if it is breadcrumb based then it's tougher

are you doing it for the whole site or just one section?

AlvinSA

12:26 pm on Jul 29, 2009 (gmt 0)

10+ Year Member



Just my listings. Have a look. Just follow any of the categories

[edited by: jatar_k at 12:34 pm (utc) on July 29, 2009]

jatar_k

12:40 pm on Jul 29, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



sorry no urls

you could split it and swap it on listing pages, you would need to figure out where to put it or how you could differentiate a listing from something else if needed

easy enough to split on pipe and then swap the first and last value

$tarr = explode('¦',$page_title);
$page_title = $tarr[2] . ' ¦ ' . $tarr[1] . ' ¦ ' . $tarr[0];
echo $page_title;

in the above code you need to swap ¦ for real pipe characters

as an aside, your urls are messed
www.example.com/Category/Accommodation.html/Hotels.html/
the double html looks like a rewrite gone wrong

AlvinSA

1:23 pm on Jul 29, 2009 (gmt 0)

10+ Year Member



I'm gonna try that.

On the aside, the url double url is actually a file name created in the control panel. It could have been called anything... Accommodation/ ....Accommodation.iff/...

Do you think that would have a negative effect with search engines?

jatar_k

1:50 pm on Jul 29, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



the double file extension is just not correct, just ditch the first .html and only leave it on the last one