How to Switch Tittle Order to "[Page Title]::[Site Name]"

Permalink 1 user found helpful
I've seen many web developers who wants to switch the order of page title by default.

So I'll share my knowledge with everyone.

Like me, sometime, I want the page title to be before the site name for SEO reason.

c5 can set the individual page title by going to [Edit Mode] - [Property] on the top of the page to name your custom page title.

But like I want it this way, many people want to display [Page Title] - [Site Name].

So here is the trick based on c5.2.1

1. Go to /concrete/elements/header_required.php
2. Around line 28, that's where page title is processed
<title><?php echo SITE . ' :: ' . $pageTitle?></title>

3. You want to change it to
<title><?php echo $pageTitle? . ' :: ' . SITE></title>

4. And save and upload it.
5. Now the page title order should change.

katz515
 
frz replied on at Permalink Reply
frz
there's a meta title attribute you can choose to add to any page. If the Theme is setup correctly, it should choose this over the page title for the title tag.
katz515 replied on at Permalink Reply
katz515
Yes, franz

It's not a big deal though.

Here is another reason why I want to make a switch.

TechCrunch: Twitter Tweaks Its Title Tags For Better Google Juice
http://www.techcrunch.com/2009/03/24/twitter-tweaks-its-title-tags-...

And I know that I can override the page title by editing the page properties. But after a hundreds of pages... that's an a couple extra hours of work.

And I would still like to display the Site Name. But page title should come before...

But I still think concrete5 should ship with the default setting for many other reasons.
frz replied on at Permalink Reply
frz
so you have Pagename : sitename by default?

that seems like a reasonable idea.
mose replied on at Permalink Reply
mose
A better way to do this is to define it in site.php as discussed here.

http://www.concrete5.org/index.php?cID=14538...
Robert2010 replied on at Permalink Reply
"3. You want to change it to
<title><?php echo $pageTitle? . ' :: ' . SITE></title>
"

Should to be:

<title><?php echo $pageTitle . ' :: ' . SITE?></title>


:)