Gossamer Forum
Home : Products : Links 2.0 : Customization :

meta_name?

Quote Reply
meta_name?
A question about meta_name and meta_keywords in category.html.

My category.def file (as downloaded) has 'Meta Description' but no meta_name. Where does meta_name come from?

Also, I put the following in the <head> of category.html:
Code:
<%if meta_name%>
<meta name="description" content="<%meta_name%>">
<%endif%>
<if meta_keywords%>
<meta name="keywords" content="<%meta_keywords%>">
<%endif%>


Trouble is, when I build, the line for name="keywords" doesn't print at all, and the name="description" line prints data from the Meta Keywords field in my category.db file. (I have data in both fields).

Clarification on this would be greatly appreciated.

Thanks,

Jeff
Quote Reply
Re: meta_name? In reply to
 
Quote:
Where does meta_name come from?

The meta_name is the Meta Description field. It is defined in the sub build_category_pages in the nph-build.cgi file as a localized variables.

Have you added any new fields in your category.def file?

The fields should print correctly since you provided the correct tags to use. The only thing I can think of is that you have edited the fields in the category.def file, which is off-setting the name (description) and keywords fields.

Regards,


------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: meta_name? In reply to
Thanks for the quick reply.

I removed the "Related" field from the category.def file. All the data is lined up in the correct fields, though. Do I need to leave "Related" in?

Jeff

------------------
Quote Reply
Re: meta_name? In reply to
 
Code:
local ($description, $related, $meta_name, $meta_keywords, $header, $footer, $next, $prev);

with the following codes:

Code:
local ($description, $meta_name, $meta_keywords, $header, $footer, $next, $prev);

Then replace the following codes:

Code:
# We set up all the variables people can use in &site_html.pl.
($description, $related, $meta_name, $meta_keywords, $header, $footer) = @{$category{$cat}}[2..7];

with the following codes:

Code:
# We set up all the variables people can use in &site_html.pl.
($description, $meta_name, $meta_keywords, $header, $footer) = @{$category{$cat}}[2..6];

Then delete or rem out # the following codes:

Code:
# Calculate the related entries and put in a <LI> list.
@related = split(/\Q$db_delim\E/, $related); $related = "";
foreach $relation (@related) {
$related .= qq|<li><a href="$build_root_url/|;
$related .= &urlencode($relation);
$related .= qq|/$build_index">|;
$related .= &build_clean($relation);
$related .= "</a> <font face=\"Verdana\" size=\"1\">($stats{$relatio
n}[0])</font></li>";
### mod Frown$stats{$relation}[0]) added to display number of related links
}

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: meta_name? In reply to
I removed the "Related" field before I added categories. The db looks okay to me.

I made the code changes you suggested. The "keyword" field is now printing correctly, but I'm still not getting anything where the "meta_name" field is.

Thanks for all your help.

Jeff
Quote Reply
Re: meta_name? In reply to
Welp, dont' know what to tell ya since I am using the same tags and codes you are in my category.html file.

BTW: The meta_name and meta_keywords tags only work in the category.html template file.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.