Developer forum

Forum » Templates » If statements error

If statements error

George Nelzo Pereira
Reply

Hi people...

Someone know how can I have in IF STATEMENTS instring the caractere "( )" like thate "<!--@If(Hupx.search = 'Nordjylland (9000-9999)')-->selected<!--@EndIf--> " in template?

I tried put and I received an error:

An unhandled exception of type 'System.StackOverflowException' occurred in System.dll
{Cannot evaluate expression because the current thread is in a stack overflow state.}


Replies

 
Morten Bengtson
Reply

Ouch! Maybe you can use some of the other operators in the if-statement?

<!--@If(Hupx.search<startswith>'Nordjylland')-->selected<!--@EndIf-->

OR

<!--@If(Hupx.search<contains>'9000-9999')-->selected<!--@EndIf-->

 

 
Nicolai Høeg Pedersen
Reply

Hi George

 

Just tried your conditional in my local installation - with another template tag though, since yours seems to come from a custom module.

 

It works in my template - running on my newest release. I would like to know which version and if you can get me a link so I can where it comes from - obviously we do not want to see errors like this, so I would like to find out what happens.

 

We did make some changes to the scripting engine in January out in latest service release, so it might help.

 

BR Nicolai

 

You must be logged in to post in the forum