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.

How to have a Dynamic Title?

September 10, 2011 11:48pm

Subscribe [3]
  • #1 / Sep 10, 2011 11:48pm

    JREAM

    16 posts

    Hi guys, I am trying to figure out how I can have my page title change per page.

    1: I have a template called index
    2: Index has {embed="includes/head}
    3: The includes/head file contains the <title> tag

    I tried <title>{title}</title> but it didnt render.

    Is there a way to do this?

  • #2 / Sep 11, 2011 12:37am

    LMO

    203 posts

    You can use the embed variables

    {embed="includes/head" page_title="{title}"}

    then add this to your head template

    <title>{embed:page_title}</title>
  • #3 / Sep 11, 2011 12:45am

    JREAM

    16 posts

    wow quick reply, thanks a lot 😊

  • #4 / Sep 13, 2011 9:41pm

    John St-Amand

    865 posts

    A correction - in the header template the variable should be {embed:page_title}.

  • #5 / Sep 13, 2011 9:54pm

    LMO

    203 posts

    Thanks for the correction! =)

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

ExpressionEngine News!

#eecms, #events, #releases