Gossamer Forum
Home : Products : Gossamer Links : Discussions :

<title><%category_name%></title>

Quote Reply
<title><%category_name%></title>
Is there any way to get this to show the current category and not "category/categoryname"

Also, is there anyway of dong a minus word with this tag like <p><%category_name -hotels%></title></p>

Appreciative of any help

Andy
Quote Reply
Re: [chapelier] <title><%category_name%></title> In reply to
Have you tried dumping the template variables to see what's available? 'Name', 'category_short' and 'category_first' look like they do what you want in the category template.

Last edited by:

aus_dave: Oct 24, 2006, 2:34 PM
Quote Reply
Re: [aus_dave] <title><%category_name%></title> In reply to
<%category_short%> is the correct variable. Keep in mind that sometimes it won't make sense to the user since you're using it out of context of the full category name.

You might consider creating a new column in the category table for a "prety" name. In my case, I have a plugin that automates the creation of a "pretty" category name for my date based categories (ie, '2006/06' becomes 'June 2006' instead of '06', '2006/06/01' becomes 'Thursday, June 01, 2006' instead of '01').

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] <title><%category_name%></title> In reply to
 
<%category_short%> is the correct variable. Keep in mind that sometimes it won't make sense to the user since you're using it out of context of the full category name.
You might consider creating a new column in the category table for a "prety" name. In my case, I have a plugin that automates the creation of a "pretty" category name for my date based categories (ie, '2006/06' becomes 'June 2006' instead of '06', '2006/06/01' becomes 'Thursday, June 01, 2006' instead of '01').

Thanks, That was just what i was looking for.

"Have you tried dumping the template variables to see what's available? 'Name', 'category_short' and 'category_first' look like they do what you want in the category template. "

I tried that but it didn't seem to work. Not sure where I went wrong!!

Thanks for the help. Appreciate it.

Andy
Quote Reply
Re: [chapelier] <title><%category_name%></title> In reply to
In Reply To:
]I tried that but it didn't seem to work. Not sure where I went wrong!!
If you have a static site you need to build the pages to see the dumped variables (another advatage of dynamic sites).

I put <%include dump.txt%> at the bottom of the templates I want to look at, and then dump.txt contains code like shown:

Code:
<%if Username eq 'admin'%>
<%DUMP%>
<%endif%>
For me it just makes sure that no-one else gets access to the dumped variables.