1 August 2007 at 11:09am
There should be some area in the CMS where you can edit a default title "appendage". For example, if I'm building my site, I don't want the title of my page to be just "Home" - I might want it to be "Home | Bandit Website", and have that " | Bandit Website" appended to the end of every title within my site, rather than having to manually add it to each page.
1 August 2007 at 2:00pm
My solution to this problem was to put it in the template.
In head of Page.ss I have:
<title>$Title.XML - $SiteName</title>
and in _config.php I put
$SiteName = "Nathan's Wondiferous Website";
Passing 'false' to $MetaTags is supposed to exclude the title, so you can put it in yourself.
Unfortunately, it seems to broken last I checked - you'll need to go into the MetaTags function in SiteTree and tell it to look for the strings 'true' and 'false' instead of booleans, since the template passes your false as a string.
1 August 2007 at 5:35pm
(Last edited: 1 August 2007 5:35pm),
How about actually removing the <title> generation from the $MetaTags function, so a site developer has control over the <title> attribute themselves, as well as being able to include $MetaTags for <meta></meta>.
1 August 2007 at 5:48pm
I've noticed this behaviour with template designers, especially when they don't assume $MetaTags generates the <title> element of the page... Your idea seems the best, since it's backwards compatible. So you have to check for 'false', rather than simply false?