Gossamer Forum
Home : Products : Gossamer Links : Discussions :

meta name global problem

Quote Reply
meta name global problem
Hi,

I am trying to use these global but ran into a problem. I put

<%if meta_name%>
<meta name="description" content="<%meta_name%>">
<%endif%>
<meta name="keywords" content="<%if Meta_keywords%><%Meta_keywords%><%else%><%_meta_keyword%>,<%_meta_keyword1%><%endif%>">

Under <title>

What I get is

<html> <head>

<title>My Site</title>

<meta name="keywords" content="Amateurs, Members, R,">


I am not geting the desc, What am I missing?

btw, Thanks Katabd for the Keyword globals!

Thanks, AuctionGuy
AuctionGuy
If you think Education is expensive, Try ignorance.

Last edited by:

AuctionGuy: Nov 14, 2002, 6:27 PM
Quote Reply
Re: [AuctionGuy] meta name global problem In reply to
Why are you using <%meta_name%>, and not <%Meta_Description%> ???? Your best bet is to do a <%GT::Template::dump%> at the bottom of you category template, and then see what value is holding your Meta Description.

Hope that helps....

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AuctionGuy] meta name global problem In reply to
That should work as far as I can see. The default is:

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

Are you sure meta_name is defined for that category?

Last edited by:

Paul: Nov 15, 2002, 2:12 AM
Quote Reply
Re: [Paul] meta name global problem In reply to
By default it should be <%Meta_Description%> and <%Meta_Keywords%>....I dont see where <%meta_name%> is coming from Unsure

This is taken from the Category > Properties page....

6 Meta_Description TEXT No Meta Description TEXTAREA
7 Meta_Keywords TEXT No Meta Keywords TEXTAREA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] meta name global problem In reply to
Andy, look in category.html, you'll then see the correct tags Wink
Quote Reply
Re: [Paul] meta name global problem In reply to
But this is stupid! On the same <%GT::Template::dump%>, in one of my categories, I can see;

meta_keywords
meta_name

as well as;

Meta_Description
Meta_Keywords

Which one are people supposed to use Wink I don't see where the meta_keywords and meta_name are defined...

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Paul] meta name global problem In reply to
Hi Paul,

I tried using Alex's global below

sub {
my $tags = shift;
my $desc = $tags->{Description} or return "No description on this template";
length $desc < 150 and return $desc;
my $short = substr ($desc, 0, 150);
$short =~ s/\s\S+?$//;
$short .= " ...";
return $short;
}

Now I get

<meta name="description" content="SUB1">

Using the plugin Yahoosubcats 1.3 brings this up no doubt. Almost there, How do I work around this?

Thanks,
AuctionGuy
If you think Education is expensive, Try ignorance.
Quote Reply
Re: [AuctionGuy] meta name global problem In reply to
You would probably have to add a new column with the proper description for it to work, otherwise you'd have to uninstall the Yahoo SubCats plugin.