Page 1 of 1
Title = Sitename + Page Heading?
Posted: Tue Feb 27, 2007 4:51 am
by Ulysses
Hi,
Looking at SEO for a site on CMCMS and I think I have a problem. The Element seems to be automatically made up by combining the Site Name and the Page Heading (ie "Title" in Add New Content). This is probably great for most sites, but for detailed and precise search engine optimisation, I need total control of the Title Element.
Code: Select all
<title>Site Name - Page Heading</title>
</head>
</__body>
<h2>Page Heading</h2>
I have seen a field in Add New Content > Options called "Description (title attribute):" which I dont understand, because the description metatag goes in the "Metadata" field above, and in any case the system seems to add content in there like "Home Page, shortcut key=1"
I'm quite confused. Where and how can I add a custom element for each page?
Thanks
PS.
Re: Title = Sitename + Page Heading?
Posted: Tue Feb 27, 2007 5:50 am
by cyberman
Not sure if I've understood right - maybe you can use a second content block above the first one like
Code: Select all
{content block="title" oneline=true}
You have to add it in your template ...
Re: Title = Sitename + Page Heading?
Posted: Tue Feb 27, 2007 8:35 am
by RonnyK
PS,
if you delete the entry in the "Description (title attribute):"-field on the option tab of the main-page, you'll see the name op the page instead of the "shortcut key"
Ronny
Re: Title = Sitename + Page Heading?
Posted: Tue Feb 27, 2007 9:04 am
by kermit
{sitename} is the global site name as defined during install or in site admin->global settings.
{title} is the page title as defined in content->pages ('title' field under the 'main' tab) for each page. this can be different than what's displayed in the menu, {menu_text}. so you can have a long page {title} while keeping its {menu_text} short and sweet.
which would give you a typical template's default tag of:
{sitename} - {title}
so, to have 'complete' control over text, omit {sitename} from the template, and just use {title}.
{title}
or if you want some custom text before or after it that's not the same as the configured site title, use something like
{title} - Some Other Text
then define the 'custom' page title (you refer to it as 'page heading') for each page ('main' tab, 'title' field). in the template,
{title}
{content}
would duplicate the page's title tag text as the page heading above the content in the page. so {title} would appear as the page and as the page's content 'heading'.
if you'd rather use the (usually) shorter 'menu text' as a heading, use the {menu_text} tag instead.
if you'd like to pick-and-choose what is used as a heading on each individual page, you'd omit it from the template and then add something like {title}, {menu_text}, or Your Custom Page Heading at the top of each page's content instead.
if you want to pick and choose which, {title} or {menu_text} is used in a page's tag, create a duplicate template with the necessary change, assigning the new template to the pages you want to use the alternate tag.
a page's "title attribute" under the 'options' tab is the title attribute of that page's anchor in the generated menus (Contact), not a page . the page {title} ({title}) is defined under the 'main' tab as the 'title' field.
Re: Title = Sitename + Page Heading?
Posted: Tue Feb 27, 2007 7:06 pm
by Ulysses
kermit wrote:
{sitename} is the global site name as defined during install or in site admin->global settings.
{title} is the page title as defined in content->pages ('title' field under the 'main' tab) for each page. this can be different than what's displayed in the menu, {menu_text}. so you can have a long page {title} while keeping its {menu_text} short and sweet.
which would give you a typical template's default tag of:
{sitename} - {title}
so, to have 'complete' control over text, omit {sitename} from the template, and just use {title}.
{title}
or if you want some custom text before or after it that's not the same as the configured site title, use something like
{title} - Some Other Text
then define the 'custom' page title (you refer to it as 'page heading') for each page ('main' tab, 'title' field). in the template,
{title}
{content}
would duplicate the page's title tag text as the page heading above the content in the page. so {title} would appear as the page and as the page's content 'heading'.
if you'd rather use the (usually) shorter 'menu text' as a heading, use the {menu_text} tag instead.
if you'd like to pick-and-choose what is used as a heading on each individual page, you'd omit it from the template and then add something like {title}, {menu_text}, or Your Custom Page Heading at the top of each page's content instead.
if you want to pick and choose which, {title} or {menu_text} is used in a page's tag, create a duplicate template with the necessary change, assigning the new template to the pages you want to use the alternate tag.
a page's "title attribute" under the 'options' tab is the title attribute of that page's anchor in the generated menus (Contact), not a page . the page {title} ({title}) is defined under the 'main' tab as the 'title' field.
Thanks kermit. That makes perfect sense to me now.
Re: Title = Sitename + Page Heading?
Posted: Wed Feb 28, 2007 11:42 pm
by Ulysses
We have decided that it would be more logical to move the element input field from the Main to Options tab so it is together with the tags where it belongs, and then to add a new field "Page Heading" in the Main tab, to add a headline to the page in the same position as currently the element is used as a heading.
Big question (for me anyway). How hard is it to add a new field (say) "headline" to the CMS? Is this major surgery?
Thanks
Re: Title = Sitename + Page Heading?
Posted: Thu Mar 01, 2007 1:03 am
by kermit
Ulysses wrote:
We have decided that it would be more logical to move the element input field from the Main to Options tab so it is together with the tags where it belongs, and then to add a new field "Page Heading" in the Main tab, to add a headline to the page in the same position as currently the element is used as a heading.
Big question (for me anyway). How hard is it to add a new field (say) "headline" to the CMS? Is this major surgery?
Thanks
i'll let someone else comment on the technical ramifications and requirements of adding another field to the page details...
i, myself, would go for the easy way out.. the way that doesn't modify core files or the database, and simply put the "headline" (as you called it) at the top of the page's content block, in whatever heading tag you use for it..
Page Headline
Page content starts here
... and leave the 'title' field where it is. if needed, it'd be trivial to add a hint or two on those admin pages to remind content editors of what goes where...
i already do this on my own sites. the 'title' (aka {title}) isn't necessarily what's on the first line of the content block (the page's content title). and, because it IS in the content block, i have the flexibility to do whatever i want with it... type my own content, use {title} or {menu_text} for it, restyle it, hide it (class="printonly"), omit it completely, or add additional content *before* it (such as a floated image or div)... without needing a separate template for every possibility.
Re: Title = Sitename + Page Heading?
Posted: Thu Mar 01, 2007 2:04 am
by Ulysses
Hi Kermit,
Yes, you're right, it would be easier to leave the items on the tabs where they are and add notes to explain what is what. We probably should do that, at least for now.
The only thing is that if we take the element out of the Page Headline position, because there is a print page graphic next to it, we then get a big blank space above the Header we add on the main content area.
It's easier to show this than explain it. Here's a graphic of what I mean. That's why I thought adding a new field (say) "headline" and placimg it in the tag position would not mess up the page layout.
[gelöscht durch Administrator]
Re: Title = Sitename + Page Heading?
Posted: Thu Mar 01, 2007 3:34 am
by kermit
Ulysses wrote:
Hi Kermit,
Yes, you're right, it would be easier to leave the items on the tabs where they are and add notes to explain what is what. We probably should do that, at least for now.
The only thing is that if we take the element out of the Page Headline position, because there is a print page graphic next to it, we then get a big blank space above the Header we add on the main content area.
It's easier to show this than explain it. Here's a graphic of what I mean. That's why I thought adding a new field (say) "headline" and placimg it in the tag position would not mess up the page layout.
if you take the 'top' one -- the
{title} in the template, out -- and leave the one you added to the page's content block in... it will 'move up'..
in the default template i looked at, 'Left simple navigation + 1 column', the output source is the *same* --
{title} above
{content} in the template, or omitted from template and inserted at top of a page's content block.
but in the content block, you can use
{title},
{menu_text} or
Whatever You Want without changing the template. if you leave it out of BOTH places, then the print icon will float happily to the right of whatever content does exist on the page..
note that "print this page" functions are all but obsolete these days.. how many site visitors to you expect to have that won't be using a browser that understands print media stylesheets? we're basically talking ie3 and netscape 4.7x or earlier here.... if the icon's buggin ya.. take it out! it's not needed. 
Re: Title = Sitename + Page Heading?
Posted: Thu Mar 01, 2007 10:48 pm
by Ulysses
Thanks Kermit. That worked prfectly. We took out {title} from the template and added Heading to the content block.
The only page I need to try and fix is the News page, where I need to add News somewhere.
Thanks again.
EDIT. Easily found what to mod and added News on both News templates and it's all done. No trouble at all.
Re: Title = Sitename + Page Heading?
Posted: Thu Aug 20, 2009 11:53 am
by Loopy
Kermit thanks for such a clear explanation of how to work with these elements, its been bugging me for a few days and decided to look it up today.
