Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Template parser

Quote Reply
Template parser
Jason,

I have the following code in a template of mine

<%elsif Link_Type ne 'sh' and $detailed_view%>

This is true if e.g. Link_Type eq 'ys' and detailed_view is true. With the same values of the two variables, the following lines are both not true

<%elsif detailed_view and $Link_Type ne 'sh'%>
<%elsif $detailed_view and $Link_Type ne 'sh'%>

And I just found out that

<%elsif detailed_view and Link_Type ne 'sh'%>

is true!!! What are the rules?

BTW: I know it's a Links SQL template, but you are The Template Parser Man, aren't you?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Template parser In reply to
Well, um, uh... It's a bug, that will be fixed in the next version of everything (including GForum 1.1.8).

<%detailed_view and $Link_Type ne 'sh'%> is where the brokeness happens, due to the $ on Link_Type. You can get around it quite easily - just take off the $ unless it's on the right hand side of a comparison operatore, or a function call argument. It should, however, work with the $ on there - this is where the bug is. Anyway, I've fixed it now.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Template parser In reply to
Thanks for the explanation (and for fixing the bug).

Ivan
-----
Iyengar Yoga Resources / GT Plugins