Display my site's name in the meta title of every page

Permalink
I know there is such a way in wordpress, and I'm wondering if there's a way to display my site's name in the meta title of every page of the site.

For example, if a page's meta title is:
Nice Wedding Dresses

I want it to take my site name and place it in front
My Site Name - Nice Wedding Dresses

 
slafleche replied on at Permalink Reply
slafleche
The <title> tag is in the header_required.php file. It's currently set to use the title defined as a page attribute. You could edit it to get the name of the page using:

<?php
$page = Page::getCurrentPage();
echo $page->getCollectionName()." - My site name";
?>
irsah replied on at Permalink Reply
irsah
Hi..

Changing the title and site name (getting meta to html) would be in your_root/concrete/elements/header_required.php file.

Copy that file to your_root/elements/ folder and edit there. The format to change would be after this line of code.

..code...
<?php 
$akt = $c->getCollectionAttributeValue('meta_title');
..more code..


p/s: do be careful in editing the line of codes (and this particular file) due to the file required for all your web pages.

If for display in pages would be from slafche codes given above.
slafleche replied on at Permalink Reply
slafleche
I agree, you should do it this way. You also don't need to worry about an update erasing your work when you have a copy outside the concrete folder.
JohntheFish replied on at Permalink Reply
JohntheFish
Magic heading can do that and a lot more to keep your meta title and description in line with site content.

http://www.concrete5.org/marketplace/addons/magic-heading/...
irsah replied on at Permalink Reply
irsah
Yeah.. almost forgot about the cool add on john, thks for reminding us..