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.

Issues with Titles

May 05, 2011 11:43am

Subscribe [2]
  • #1 / May 05, 2011 11:43am

    yourlume

    2 posts

    Hello,

    My web developer stepped away from the project and I am looking for a bit of help with modifying a few titles that share the same tag.

    If you go to http://www.yourlume.com you can notice that the “story” and “post a story” share the same title…I believe this is being generated from the home page.  Below is the code from the template for the Post a Story page, any help on what I would need to do to add custom titles to these pages so Google will recognize them.

    thanks,

    Andrew

    Code below:

    {assign_variable:my_weblog="lume_general"}
    {assign_variable:my_template_group="general"}
    
    {embed="core/.html_head"}
    
    <body class="blog pitch">
    
        <div id="header">
            <div class="content">
                {embed="core/.nav_primary" weblog="{my_weblog}" template="{my_template_group}"}
                {embed="core/.nav_utility"}
            </div>
        </div>
        
        <div id="wrapper">
            <div id="frame">
        
            
            
            <div id="primary" class="general">
                {exp:weblog:entries weblog="{my_weblog}" orderby="date" sort="desc" limit="15" disable="member_data|trackbacks" category="not 11" }
                        <h1 class="categoryHeader">{title}</h1>
                        {general-body }
                        
                {/exp:weblog:entries}
                {embed="core/.journal"}
            </div>
            
            <div id="secondary">
                <h3 id="ecostory" class="title">Eco Story</h3>
                YourLUME has partnered with American Forest to plant trees.  For every story you contribute, YourLUME will make a donation to help grow our forests.
                <a href="http://www.americanforests.org/" target="_blank" rel="noopener">/resources/images/embed/americanForest.jpg</a>    
            </div>
            
            {clear}
            
            {embed="blog/calendar-code"}
            {embed="core/.html_foot"}
  • #2 / May 05, 2011 12:05pm

    Mark Bowen

    12637 posts

    Hiya,

    Looks to me like your title will be being generated by the embed near the top of the code :

    {embed="core/.html_head"}

    If you take a look at that template_group/template_name (core/.html_head) you should see your <title> tag in there. To change the titles in the easiest way would be to do something like this :

    Main Templates

    {embed="core/.html_head" page_title="This is what I want to show as a title"}

    Embedded (core/.html_head) Template

    …rest of template code…
    <title>{embed:page_title}</title>
    …rest of template code…

    There are many many different ways of going about this though and it really does depend on exactly how the developer coded the rest of the templates but hopefully that should give you a head start in the right direction.

    Best wishes,

    Mark

  • #3 / May 05, 2011 1:50pm

    yourlume

    2 posts

    Thanks Mark…

    Below is the code from the core/.html_head.

    Any help would be appreciated…

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html >
    
    
    <head>
    <title>yourLUME | Adventure Stories, Non Profits, Outdoor Clothing, Gear and Equipment for Your Journey</title>
    <meta http-equiv="Content-Type" content="text/html; charset={charset}" />
    
    <meta name="title" content="{exp:weblog:info weblog="{my_weblog}"}{blog_title}{/exp:weblog:info}" />
    <meta name="google-site-verification" content="Y65MQDkOPVfFLqFhV_cg10v9d2WMWe4gF9K7pVp3lio" />
    <meta name="description" content="Shop <em>yourLUME</em> for camping gear, outdoor clothing and equipment you need for that next adventure.  When you get back from your adventures, share your story or browse through our growing library of outdoor adventures." >
    <meta name="keywords" content="camping, hiking, travel, trail, sustainable">
    <link rel="image_src" href="http://yourlume.com/resources/images/embed/lume_facebookImg.jpg" />
    <link rel="icon" href="http://yourlume.com/favicon.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="http://yourlume.com/favicon.ico" type="image/x-icon" />
    
    
    
    {!-- CSS --}
    <link rel="stylesheet" type="text/css" media="all" href="/global/css/base.css" />
    <link rel="stylesheet" type="text/css" media="all" href="/global/css/site.css" />
    
    {!-- TEMPLATE CSS --}
    {if embed:css != ''}
      <link rel="stylesheet" type="text/css" media="all" href="{site_url}/global/css/{embed:css}" />
    {/if}
    
    {!-- REMOTE JS --}
    [removed][removed]
    
    {!-- GLOBAL JS --}
    [removed][removed]
    
    {!-- LIBS & SITE JS --}
    [removed][removed]
    [removed][removed]
    
    {!-- TEMPLATE JS --}
    {if embed:js != ''}
      [removed][removed]
    {/if}
    
    {!-- FEEDS --}
    <link rel="alternate" type="application/rss+xml" title="RSS" href="{path=core/rss_2.0}" />
    <link rel="alternate" type="application/atom+xml" title="Atom" href="{path=core/atom}" />
    
    </head>
  • #4 / May 05, 2011 2:33pm

    Mark Bowen

    12637 posts

    Well as mentioned above you have :

    <title>yourLUME | Adventure Stories, Non Profits, Outdoor Clothing, Gear and Equipment for Your Journey</title>

    supplied in your core/.html_head template so every time it gets called on each page it will always have the same title.

    If you update your code as I showed above then that should fix things for you.

    Best wishes,

    Mark

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

ExpressionEngine News!

#eecms, #events, #releases