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.
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.
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:
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.