We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Page Titles

Development and Programming

fusiondesigner's avatar
fusiondesigner
20 posts
14 years ago
fusiondesigner's avatar fusiondesigner

Twisted College Can anyone tell me how to get the Page titles optimized on every page, so far I have beta meta nsm installed, but its’s only running on certain sections such as the post or article channel.

       
LMO's avatar
LMO
203 posts
14 years ago
LMO's avatar LMO

fusiondesigner,

If you have the embed for you header inside of you channel entries loop (this will only work if that is the case) you could pass the title to the embedded template like so:

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

This will allow you to add a variable to your “.head” template that would spit out the title of the entry being displayed and would look like this:

{embed:page_title}

Give this a try and let me know if it worked for you.

       
Dan Decker's avatar
Dan Decker
7,338 posts
14 years ago
Dan Decker's avatar Dan Decker

Hello fusiondesigner,

I’m going to migrate this thread to Development and Programming so the Community there can offer their experiences.

VIM, thank you for your suggestions!

Best,

       
fusiondesigner's avatar
fusiondesigner
20 posts
14 years ago
fusiondesigner's avatar fusiondesigner

I managed to get the home page title sorted by using the code from nsm beta meta’s site:

{exp:nsm_better_meta:template
    title="Super amazing unique homepage title"
    hide_site_title = "y"
  }

Now I am trying to optimize the category url’s as seen here:

Drunken Gossip

These are the article channel categories. There is no entry for nsm on these categories, so where do I put the exp tag on the article index template?

This is the code from that:

{preload_replace:my_channel="articles"}
{preload_replace:my_template_group="articles"}
{preload_replace:channel="articles"}
{embed="_embeds/.head"}

{embed="_embeds/.header"}
<!-- content block start -->
    <div id="content">
        {embed="_embeds/.left_column"}
        <div class="content-area">

            <!-- content area video thumbnails list start -->
    {exp:category_id category_group="1" category_url_title="{segment_2}" parse="inward"}
            <div class="video-list">

                <h2 class="fraternal-video Light15"><strong>Articles
                

                {if segment_2 != ''}
                - [
                

                {exp:channel:categories channel="{my_channel}" show="{category_id}" style="linear"}
                
                    <font color="#FFFFFF">{category_name}</font>
                {/exp:channel:categories}                
                ]
                {/if}
                </strong> </h2>
                
                
                
                {exp:channel:entries channel="{my_channel}" category="{category_id}" limit="10" status="open|featured" track_views="one"}
                    <div class="art_block">
                        <div class="art_title">{title}        
                                        
                            {if logged_in_member_id == author_id}
                            <a href="http://{site_url}account/edit_article/{entry_id}" title="edit my article">_                            {site_url}images/editIcon.gif</a>
                            {/if}                        </div>
                        <div class="art_summary">
                            {summary}    
        
                            <a href="http://{site_url}articles/details/{url_title}">...view more</a>
                            <div class="art_date" align="right">Author : <span class="art_author">{author}</span> Created on : <span class="adt1">{entry_date format="%F %d, %Y"}</span></div>
                        </div>                    
                    </div>
                    
                    <!--{sidebars}
                           {embed="inc/{url_title}"}
                    {/sidebars}-->
                    
                {if no_results}

                <div align="center">Sorry!, nothing to see here!</div>

                {/if}
                
                {paginate}                
                    {if "{total_pages}" != 1}
                
                        
                            Page {current_page} of {total_pages} : pages 

{pagination_links}
                        
                    {/if}
                    {/paginate}
                

                {/exp:channel:entries}
                                

            </div>
{/exp:category_id}
            <!-- content area video thumbnails list end -->

        </div>
        {embed="_embeds/.right_column"}
    </div>
    <!-- content block end -->


  {embed="_embeds/.footer"}

Also this:

nsm category index template:

{preload_replace:this_index_channel="news"}

Template: nsm_better_meta/category-index


{exp:channel:category_heading channel="{this_index_channel}"}
    {if no_results}{redirect="404"}{/if}
    {embed="nsm_better_meta/.header"
        title="{category_name}"
        title_suffix="nsm_better_meta/category-archive"
        description="{category_description}"
    }
    <h1>{category_name} <small> — Category archive</small></h1>
{/exp:channel:category_heading}

<ol>
    {exp:channel:entries channel="{this_index_channel}"}
    {if no_results}<li>No entries have been assigned to this category</li>{/if}
    <li><a href="http://{if">{title}</a></li>
    {/exp:channel:entries}
</ol>

{embed="nsm_better_meta/.footer"}

Cheers.

       
fusiondesigner's avatar
fusiondesigner
20 posts
14 years ago
fusiondesigner's avatar fusiondesigner

Any ideas how to get page titles optimized in categories, want to get this done this week 😛

       
fusiondesigner's avatar
fusiondesigner
20 posts
14 years ago
fusiondesigner's avatar fusiondesigner

Why was this moved, surely its general support nothing going on in here, I’m stuck with a project and CMS that has bizarre out the box SEO functionality.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.