Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

meta_keywords and templates problem

Quote Reply
meta_keywords and templates problem
Hi

I'm doing an install of linke and using the templates feature for the first time (the client will want them, I'd _much_ rather hack the .pl file!).

My problem is that this in the category.html files:

Code:
<%if meta_name%>
<meta name="description" content="<%meta_name%>">
<%endif%>
<if meta_keywords%>
<meta name="keywords" content="<%meta_keywords%>">
<%endif%>

is resulting in this when the pages are built:

Code:

<meta name="description" content="ODEN links to Local suppliers of business products and business information and advice. The Open District Electronic Network (ODEN) is operated by North Kesteven District Council.">
<if meta_keywords%>
<meta name="keywords" content="ODEN, NKDC, goods, supplies, links, local, suppliers, products, business, information, advice, Open District Electronic Network, North Kesteven District Council">

The problem is that the <if meta_keywords%> is left in.

I've not changed anything in Templates.pm and nothing that should matter in site_html_templates.pl.

I can't believe this is the dafault way it works?

Any ideas anyone?

TIA

Chris
Quote Reply
Re: meta_keywords and templates problem In reply to
 
Quote:
I can't believe this is the dafault way it works?

Sadly it is. The template is missing a % sign it. It should be:

<%if meta_name%>
<meta name="description" content="<%meta_name%>">
<%endif%>
<%if meta_keywords%>
<meta name="keywords" content="<%meta_keywords%>">
<%endif%>

Note the extra % sign. Be sure to install the Extended Template.pm mod, as it lets you do a lot of neat things. Might make you want to switch all your sites to tempaltes. =)

Cheers,

Alex
Quote Reply
Re: meta_keywords and templates problem In reply to
Cheers for that Alex :-)

I'm getting to know my way around vi and it's even easier than editing a web form :-)

Chris