Hey,
In a productlist template I have this if statement:
<!--@If Defined(Ecom:Group.ID)-->....do some output......<!--@EndIf-->
It all seems pretty straight forward, but Dynamicweb does not replace the if statement. It seems like Dynamicweb does not interprete my if statement at all!
What am I doing wrong?? I am using Dynamicweb v. 19.2.0.2.
Developer forum
E-mail notifications
If statement not being replaced by Dynamicweb
Lars Larsen
Posted on 24/08/2011 12:13:26
Replies
Nicolai Høeg Pedersen
Posted on 24/08/2011 12:53:46
Your endif statement is wrong. When using if defined you have to do like this:
<!--@If Defined(Ecom:Group.ID)-->....do some output......<!--@EndIf(Ecom:Group.ID)-->
http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/General-tags/If-Defined-tags.aspx
If using the new if statements, use the endif that you wrote.
<!--@If Defined(Ecom:Group.ID)-->....do some output......<!--@EndIf(Ecom:Group.ID)-->
http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/General-tags/If-Defined-tags.aspx
If using the new if statements, use the endif that you wrote.
Lars Larsen
Posted on 24/08/2011 13:41:43
Oh, yes your are right. I think I got that wrong because I started out using the new if statement. My original code looks something like this:
<!--@If(FinansieringsType='AMU')-->...do some code...<!--@EndIf-->
But I can not make it work! I have a DwTemplateTag just before the if statement and in the tag list I can see my tag "FinansieringsType". So I really don't understand why I can't make it work :-S
Nicolai Høeg Pedersen
Posted on 24/08/2011 14:35:48
Let us see the template...
Lars Larsen
Posted on 24/08/2011 15:23:18
Here is my template. The if statement is in line 102. Could the problem be that I set the tag FinansieringsType in a ProductListTemplateExtender?
Nicolai Høeg Pedersen
Posted on 24/08/2011 22:09:47
This post has been marked as an answer
19.2.0.2 does not support if in templates. Only if defined.
Votes for this answer: 0
You must be logged in to post in the forum