Gossamer Forum
Home : Products : Gossamer Links : Discussions :

category_name at add.html ?

Quote Reply
category_name at add.html ?
Hello all,

How can i insert <%category_name%> at add.html, i did try but the result is Unknown Tag: 'category_name'

Please help.
Quote Reply
Re: [reenee] category_name at add.html ? In reply to
Hi,

Use <%GT::Template::dump%> to see a list of all tags available at any time. Just put that in your template, then view it, and you'll see what tags you can use.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] category_name at add.html ? In reply to
Hi Alex,

Yes i did, but no one i can use to be a title at add.html..Please help
Quote Reply
Re: [reenee] category_name at add.html ? In reply to
You could use a global:

category_name_from_id =>

sub {
my $tags = shift;
if (! $tags->{ID}) { return "You must pass in ID=n to this template."; }
my $name = $DB->table('Category')->get_name_from_id($tags->{ID});
return $name;
}

Cheers,

Alex
--
Gossamer Threads Inc.