Tags and Meta Keywords
Posted: 24 January 2008 10:47 AM   [ Ignore ]
Newbie
Rank
Total Posts:  2
Joined  2008-01-24

Okay so I have entered a list of tags for each of my entries. How do I now display those tags within the standard meta keywords within the html head of each page:

<meta name="Keywords" content="my tags" />

Baring in mind that only a single weblog entry is display per page and I want that entries tags on that page.

thanks in advance,
s.,

Profile
 
 
Posted: 24 January 2008 10:52 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

Actually, that’s pretty clever! smile

Assuming you’re asking for this to be done on Permalink/Comment pages, where the URL Title or Entry ID is in the URL, you should just have to Plop the Tag:Tags loop into there:

<meta name="Keywords" content="{exp:tag:tags entry_id="{entry_id}" type="weblog" backspace="2" orderby="clicks" sort="desc" limit="10"}{tag}, {/exp:tag:tags}" />

 Signature 
Profile
 
 
Posted: 24 January 2008 10:56 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  2
Joined  2008-01-24

you rock! worked like a charm!

Profile
 
 
Posted: 06 March 2008 02:31 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  7
Joined  2008-01-17

salandra, how is that working for you. Have you measured the effectiveness of those keywords and did you manually add the tags or harvest them?

Profile
 
 
Posted: 19 April 2008 03:02 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  3
Joined  2007-04-08

Hi,
solution doesn’t work for me… is the code any different on article pages?

Profile
 
 
Posted: 21 April 2008 06:07 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

Roman, the above code would only work for a single entry page, as it would dynamically pull the data from an entry smile

If you would like to use something like this on a page showing multiple entries, I would suggest something like the Tag Cloud. smile

<meta name="Keywords" content="{exp:tag:cloud weblog="my_blog" limit="40" backspace="2"} 
{tag}, {/exp:tag:cloud}" 
/>

 Signature 
Profile
 
 
Posted: 21 April 2008 08:09 AM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  3
Joined  2007-04-08

Hi,
it is a single entry page!
I’ll show you a piece of the code:

{assign_variable:berlinista_articles="articles"}
{assign_variable
:berlinista_events="events"}
{assign_variable
:berlinista_previews="previews"}

{assign_variable
:page_title="Berlinista"}
{assign_variable
:heading_left_more="Related Entries"}
{assign_variable
:heading_right_more="More Related Entries"}

{assign_variable
:categorys_top=""}
{assign_variable
:categorys_left="6"}
{assign_variable
:categorys_right="4|8|15|12|5|16|20"}


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">

<
head>

<
title>Berlinista {exp:weblog:entries rdf="off" limit="1" status="feature|open" disable="trackbacks"}{title}{/exp:weblog:entries}</title>

<!-- 
Meta-Daten -->
<
meta http-equiv="Content-Type" content="text/html; charset={charset}"/>
<
META NAME="Title" CONTENT="Berlinista - {exp:weblog:entries rdf="off" limit="1" status="feature|open" disable="trackbacks"}{title}{/exp:weblog:entries}">
<
meta name="description" content="{exp:weblog:entries rdf="off" limit="1" status="feature|open" disable="trackbacks"}{en_summary}{/exp:weblog:entries}"/>
<
meta name="keywords" content="{exp:tag:tags entry_id="{entry_id}" type="weblog" backspace="2" orderby="clicks" sort="desc" limit="10"}{tag}, {/exp:tag:tags}" />
<
meta name="audience" content="All"/>
<
meta name="author" content="Berlinista"/>
<
meta name="publisher" content="Berlinista"/>
<
meta name="copyright" content="Berlinista"/>
<
meta name="Robots" content="index,follow"/>
<
meta name="Language" content="English"/>
<
meta name="revisit-after" content="1 Day"/>
<
meta name="Content-Language" content="en"/>
<!-- 
END Meta-Daten -->

<!-- 
CSS-Einbindung -->
<
link href="/css/layout_berlanista.css" rel="stylesheet" type="text/css"/>
<!--
[if lte IE 7]>
<
link href="/css/patches/iehacks_subtemplates.css" rel="stylesheet" type="text/css" />
<!
[endif]-->
<
link rel="stylesheet" href="/css/lightwindow.css" type="text/css" media="screen" />
<!-- 
END CSS-Einbindung -->











<?php require_once("./mint/pepper/mlslatest/crawlers/tracker.php"); ?>

</head>


<
body>
<
div id="page_margins">
 <
div id="page">
  <
div id="header">
   
{embed="global/topnav"}
   
<h1>Berlinista.com</h1>
  </
div>

  
{embed="global/nav" loc=""}

  
<!-- #main: Beginn Inhaltsbereich -->
  
<div id="main"> <a id="content" name="content"></a>
   <!-- 
Skiplink-AnkerContent -->
   <
div class="subcolumns">
 <
div class="c66l">
  <
div class="subcl">

  
{exp:weblog:entries weblog="{berlinista_articles}" orderby="date" sort="desc" limit="1" status="open|feature" disable="trackbacks" paginate="bottom" paginate_type="field"}
   
<h2>{categories backspace="1"}{category_name},{/categories}</h2>
   <
div class="brightness">
   <!--
StartEntry-->
   <
div class="entry">
    <
h3 class="teaserhead"><a href="{title_permalink="en/article"}{entry_id}">{title}</a></h3>
    <!--<
class="posted">{entry_date format=' %l, %d. %F %Y '} by {author}</p> -->
    <
img src="{article_image}" width="410px" alt="Thumb" class="float_left" />
    
{if segment_5 == ""}
    {en_summary}
    {
/if} 
    {multi_field
="en_body|en_page1|en_page2|en_page3|en_page4|en_page5"}
   
</div>
   <!--
EndeEntry-->

It’s our article page.
Thanks’ for your help
Roman

Profile
 
 
Posted: 21 April 2008 08:21 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

Thanks Roman… well… all appears to look ok.

What does it output in your source code? smile
Can you paste the HEAD part of your parsed code?

Thank you wink

 Signature 
Profile
 
 
Posted: 21 April 2008 08:52 AM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  3
Joined  2007-04-08

Hi, as i just had to find out it works - depending on the article…

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">

<
head>

<
title>Berlinista Croucher &ampMyles Vicious Cycle Video</title>

<!-- 
Meta-Daten -->
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<
META NAME="Title" CONTENT="Berlinista - Croucher &amp; Myles - Vicious Cycle Video">
<
meta name="description" content="<p>Soma Records, the Glasgow based electronic music label are active in promoting the genre in many ways.
</p>"
/>
<
meta name="keywords" content="vicious cycle, the unknown wanderer, glasgow, ian croucher, yorkhill childrens hospital, soma, leigh myles, croucher & myles, alex smoke" />
<
meta name="audience" content="All"/>
<
meta name="author" content="Berlinista"/>
<
meta name="publisher" content="Berlinista"/>
<
meta name="copyright" content="Berlinista"/>
<
meta name="Robots" content="index,follow"/>
<
meta name="Language" content="English"/>
<
meta name="revisit-after" content="1 Day"/>
<
meta name="Content-Language" content="en"/>
<!-- 
END Meta-Daten -->

<!-- 
CSS-Einbindung -->
<
link href="/css/layout_berlanista.css" rel="stylesheet" type="text/css"/>
<!--
[if lte IE 7]>
<
link href="/css/patches/iehacks_subtemplates.css" rel="stylesheet" type="text/css" />
<!
[endif]-->
<
link rel="stylesheet" href="/css/lightwindow.css" type="text/css" media="screen" />
<!-- 
END CSS-Einbindung -->

<?php require_once("./mint/pepper/mlslatest/crawlers/tracker.php"); ?>

</head>

Will have to dive into the code to find the reason. Must have something to do with the category....
I’m on my way to find the solution, so thanks’ again!!!

Profile