OpenEdit Developer ForumWelcome back ExternalUser to the forum. This forum is only for developers who want to discuss the technical aspects of the OpenEdit Framework. For end user technical support please visit the EnterMedia web site. One Layout, Many Pages, Many TITLEsIf I want to use one layout, what is the best way to conditionalize or vary the META tags within the layout? I saw this in the documentation - where do you use it? 2. <title>$!content.title</title>
Thank you. Posted by Scott Herring Sat, Feb 7 2009 1:45 PM
|
Most Recent Posts
Slamdance
(5 comments)
Help upgrading jars on starter war
(4 comments)
Help, Velocity Generator not initializing
(3 comments)
Multiple Main Sites
(4 comments)
Search filtering by theme
(1 comments)
xml version "s1.0" error
(4 comments)
How can i localization the openedit?
(2 comments)
Problem with the interface
(4 comments)
latest openedit-editor build
(2 comments) Archive
Tools
Syndicate:
|
Copyright 2008 OpenEdit Inc. All rights reserved. last modified: Feb 07 2009

Place the title tag in the <head> </head> section of your page as normal. You can/should also add stuff like:
<meta name="keywords" content="$!content.keywords"/>
<meta name="description" content="$!content.description"/>
Then you will be able to use the property editor to set those values on a page per page basis. If you set the title property in the main root level _site.xconf it will trickle down to every page - you can override it by setting it on a lower level folder or an individual page.
Unfortunately, I still don't see how this use of $!content works. If you put the value in _site.xconf, it's global. I want individual meta tags for each page (for SEO and reasonable context). The way the developer originally created the page, ALL the <head></head> info is in the template layout. How do you structure the pages when you have a typical site HTML format:
<head>
<title>
<meta tags>
<javascript>
</head>
<body>
<content>
</body>
Hey - this was a while ago - but the answer is that pages only inherit stuff from the global _site.xconf - so for example, if you had a _site.xconf at the root level with:
<property name="title">Welcome!</property>
and a file called about.html that you wanted a different title for, you'd add a file called about.xconf, in the same folder, and add
<property name="title">Welcome to the about page</property>
Then, every page in the site would have "welcome!" as the title except the about page. You can use this to great advantage as you can specificy this at the folder level - so _site.xconf at the root level is the default, but if you had a folder called /faqs/ you could create a file called /faqs/_site.xconf and add <property name="title">Welcome to the faq section!</property> - all files in that folder would use the title property from there.
This may seem like a bit of work, but the property editor handles it for you. Choose "page settings" and fill in the blanks - voila, new meta tags.
Unfortunately, Google doesn't rank pages well that share common sets of META tags. For years, they didn't even bother with them, and now they do - but in a way that can hurt your site. The best thing is to not repeat descriptions across any pages. The solution was a separate XCONF for every page. Oh, well...
Thanks, Ian.