Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

CatLinks.CategoryID in modify.html

Quote Reply
CatLinks.CategoryID in modify.html
Heya all,

I'm trying to present the user with different options depending on which category they are trying to post a link to.

When adding a link (add.html) the category id is represented by <%ID%>. I've tried the IF statement below and it works fine.

<%if ID==11%>
...do something...
<%endif%>

However, when modifying (modify.html) the category id is represented by <%CatLinks.CategoryID%>. When I place this tag in the template the correct value shows up fine, but I've tried the IF statement below and it doesn't work....

<%if CatLinks.CategoryID==11%>
...do something...
<%endif%>

Why is this? I've also done a <%GT::Template::dump%> and the value for <%CatLinks.CategoryID%> is definitely available in modify.html.

Safe swoops
Sangiro

Last edited by:

sangiro: Oct 13, 2004, 4:12 PM
Quote Reply
Re: [sangiro] CatLinks.CategoryID in modify.html In reply to
I think the problem is with the dot. Try <%set temp=$CatLinks.CategoryID%><%if temp==11%> - not sure this will fix it but it is the first thing I would try.
Quote Reply
Re: [afinlr] CatLinks.CategoryID in modify.html In reply to
Worked like a charm. Thanks for the suggestion. Smile

Safe swoops
Sangiro