solved Meta Tag Manager

sekeri
sekeri
@ilker
10 years ago
334 posts
I am not so much clear about what to do on the specific cases below;

1- I'd like to give description and keywords meta tags for my homepage

2- I have list pages like mysite.com/articles or mysite.com/lessons. How can I set meta tags for these pages


updated by @ilker: 08/14/14 02:08:26AM
douglas
@douglas
10 years ago
2,790 posts
I don't believe the Meta Tag Manager will do separate descriptions and keywords for separate "front-end" pages, a work around would be to modify the "articles" and/or "lessons" templates and add your own.

You can use an assign function above the header include function to do this, something like:

Keywords:
{assign var="page_keywords" value="your,keywords,here"}

Description:
{assign var="page_description" value="your description here"}

Then in your skins/YOURSKIN/meta.tpl file, find this:

{if isset($meta)}
{foreach from=$meta key="mname" item="mvalue"}
<meta name="{$mname}" content="{$mvalue}" />
{/foreach}
{/if}

and change it to this:

{if (isset($page_keywords) && strlen($page_keywords) > 0) && (isset($page_description) && strlen($page_description) > 0)}
<meta name="keywords" content="{$page_keywords}">
<meta name="description" content="{$page_description}">
{elseif isset($meta)}
{foreach from=$meta key="mname" item="mvalue"}
<meta name="{$mname}" content="{$mvalue}" />
{/foreach}
{/if}

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
sekeri
sekeri
@ilker
10 years ago
334 posts
I just wanted to be sure if there is a way to do it with Meta Tag Manager. But it looks like there is not. So that using an easy workaround like you offer is the best way I think. Thank you Douglas!

Tags