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.

Weblog article title in an embeded template.

January 12, 2009 3:25pm

Subscribe [4]
  • #1 / Jan 12, 2009 3:25pm

    EvanSnyder

    9 posts

    I guess my first question before I go any further would be, Is it good practice to embed the html header content for my website? The javascript, css links, meta is the same through-out my site so I figured it would be a good idea to create a separate template and embed this information using the {embed} ‘includes’ method.

    If this is a yes, then here’s my REAL question:

    I have figured out how to pass the location of visitors to the <title> section in the embeded header by assigning variables and passing them in the embed code snippet, but I haven’t figured out how to pass a article title based on the visitors location to the <title> header section.

    Since the page is rendered before embeded templates, I can’t for the life of me figure out how to get my embeded header to parse the EE tag for article titles to place them in the <title> header section to in turn place them in the browser window.

    Did that make sense, or am I talking non-sense?

    Thanks…

  • #2 / Jan 12, 2009 4:39pm

    Boyink!

    5011 posts

    Yes and read this..😉

  • #3 / Jan 12, 2009 4:49pm

    grrramps

    2219 posts

    I guess my first question before I go any further would be, Is it good practice to embed the html header content for my website? The javascript, css links, meta is the same through-out my site so I figured it would be a good idea to create a separate template and embed this information using the {embed} ‘includes’ method.

    Ditto from me, too. Almost any section of a site’s web pages which gets repeated often is a good candidate for a template of its own. Header, navigation, footer, credits, and so on.

    I have figured out how to pass the location of visitors to the <title> section in the embeded header by assigning variables and passing them in the embed code snippet, but I haven’t figured out how to pass a article title based on the visitors location to the <title> header section.

    Since the page is rendered before embeded templates, I can’t for the life of me figure out how to get my embeded header to parse the EE tag for article titles to place them in the <title> header section to in turn place them in the browser window.

    There are probably a half dozen ways to do it—from simple to esoteric to complex.

    For me, I simply break down a page in to various segments (I call them regions): header, navigation, columns, banner, footer, main, copyright, etc. But for the basic entry page where you want the Title to appear in the header, just make the header segment end before </head> , and the body segment begin before the <body> (with EE’s tags at the top).

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

ExpressionEngine News!

#eecms, #events, #releases