Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Simple text tag in links.html

Quote Reply
Simple text tag in links.html
Hi All,

I am trying to add a text tag in link.html based on the category of the Link.

Using an "if" like this...

<%if CategoryID eq '70'%>
&nbsp;<font color="#c00000" size=1>fw</font>
<%endif%>

doesnt work.:(

I have read the help files and searched the posts, and asked me mates.:) but no solutions.
Any help would be appreciated.

Thanks

Dave
Quote Reply
Re: [DDave] Simple text tag in links.html In reply to
Because 'category_id' is the correct variable. Also the 'ID' seems to have the category id value.

Use the <%GT::Template::dump%> tag to display find the usable variables.

Code:
<%if category_id eq '70'%>
&nbsp;<font color="#c00000" size=1>fw</font>
<%endif%>

All above should be inserted into the category.html template.
If you want to display in link.html, use the available variable dump solution to find what you need.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Simple text tag in links.html In reply to
Thanks Webmaster33,

but I am sorry I dont understand what you are trying to say.

Dave



Code:
Quote Reply
Re: [DDave] Simple text tag in links.html In reply to
Dave,

Try the corrected code I posted in my previous post.

If this is not working, then put <%GT::Template::dump%> into category.html or links.html template to display variables you can display in template (you will get big page and a loooong list with variables and values displayed).

Please try out what I'm suggesting, then come back and tell we what happened.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [DDave] Simple text tag in links.html In reply to
Try

Code:
<%if category_id == 70%>
&nbsp;<font color="#c00000" size=1>fw</font>
<%endif%>

i.e. == instead of eq.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Simple text tag in links.html In reply to
You'll need '70' not 70 otherwise Links SQL thinks its a variable rather than a number.

Last edited by:

Paul: Apr 4, 2002, 4:44 AM
Quote Reply
Re: [Paul] Simple text tag in links.html In reply to
In Reply To:
You'll need '70' not 70 otherwise Links SQL thinks its a variable rather than a number.

No. Try

Code:
<%set a = 70%>
<%if a == 70%><hr><%endif%>
in one of your templates

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Simple text tag in links.html In reply to
Hmm I've had problems with things not working as expected in the past but when I used ' ' it started to work.

Im sure Jason mentioned something about this in the GForum forum but I can't find it, although you are right...in the docs it doesn't use ' '
Quote Reply
Re: [yogi] Simple text tag in links.html In reply to
Ah I think I know what it is now...its if you put the number first you need to use ' '

eg...I think you'd need

<%'70' * 5 %>

Rather than:

<%70 * 5%>

...but:

<%tag * 5%> ...is ok.

Last edited by:

Paul: Apr 4, 2002, 5:33 AM
Quote Reply
Re: [Paul] Simple text tag in links.html In reply to
Thanks All for your replies..., but it still aint working..Unimpressed

I have tried every combination there is of <%if category_id == '70'%>

<%if category_id == 70%>
<%if category_id eq 70%>
<%if category_id == '70'%>
<%if category_id eq '70'%>

for

<%if category_id == 70%>
&nbsp;<FONT COLOR="#c00000" size=1>FW</FONT>
<%endif%>

and cannot get it to work.(and if it does it tags EVERY link, which is not desired.:()


webmaster33,

Thanks. I did go back and use <%GT::Template::dump%> - and tried some other variables and they did not work either.


yogi

I did not try your code

<%set a = 70%>
<%if a == 70%><hr><%endif%>

as I was unsure as to what it di or if it was a reply for me?


So... I still don't have the answer.:(

Thanks

Dave
Quote Reply
Re: [DDave] Simple text tag in links.html In reply to
Ok getting the hang this stuff now;)

Thanks wm33.:)

<%GT::Template::dump%> in link.html gave me NO category variables. So I am assuming what I want to do... can not be done.(Pls. tell me if I am wrong)

A friend tells me a new global could fix this prob... so I am off to learn some more.

Thanks

Dave