ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

page titles

September 29, 2008 7:24am

Subscribe [0]
  • #1 / Sep 29, 2008 7:24am

    frenzal

    136 posts

    Here’s something I’ve just ran in to as the site nears completion. I have a header and footer template which I embed everywhere, I like to avoid duplicating templates at all costs. So far this works nicely until I noticed that I forgot to handle my page titles. Because the page title is set in the header template which is embedded everywhere by the time I have access to the weblog title for instance I can no longer change the page title.. I think?

    Whats the best way to deal with page titles when you embed a header, it seems to me that this must be something quite common.

  • #2 / Sep 29, 2008 10:31am

    Robin Sowell

    13255 posts

    There can be a great deal of variation on this one, depending on personal prefs and how the site is setup.  I tend to do it in the header (which is embedded) and use some php parsed on input to conditional flip out some tags.  I don’t love that way- so sometimes I start my header in the actual templates and just embed like a ‘top nav’- then I can ditch the php conditionals for the most part and put the title and any tags needed to generate it there.

    For a really clear discussion of a couple of approaches- check out Lisa’s SEO/Title article.  Think that should give you a good idea of how to go at it.

    Let me know how it works out- and yell back if you run into an issue.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases