<!--IFFieldName Issue

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
fridolinweiner
Contributor
Contributor
Posts: 5
Joined: Wed May 30, 2012 7:49 pm

<!--IFFieldName Issue

Post by fridolinweiner »

Me again...

I try to alter the style if a DVD is borrowed

so i used this code:

Code: Select all

<table <!--IFdueDate style="background-color:#FFE2E2 ;" ENDdueDate--> class="box" cellpadding="0" cellspacing="0">
after exporting

Code: Select all

<table style="background-color:#FFE2E2 ;" class="box" cellpadding="0" cellspacing="0">
It works perfectly fine!

But in another template using this code:

Code: Select all

<tr <!--IFdueDate style="background-color:#FFE2E2 ;" ENDdueDate--> >


or for showing one picture and another if the dvd is borrowed:

Code: Select all

<img src:"Images/rent<!--IFdueDate no ENDdueDate-->.png" >
nothing happens, after exporting the template, the code is not replaced, but still there.

What am I missing?
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: <!--IFFieldName Issue

Post by Conor »

It's likely for the other templates you are missing the [key:dueDate]. The key needs to appear somewhere within the <--BeginRepeat--> <--EndRepeat--> tags, otherwise the template system does not bother checking for the IF tags. You can add them right after the begin repeat as an HTML comment.

Code: Select all

<!--[key:dueDate]-->
fridolinweiner
Contributor
Contributor
Posts: 5
Joined: Wed May 30, 2012 7:49 pm

Re: <!--IFFieldName Issue

Post by fridolinweiner »

You're the best!
The template will be soooooooo nice!
User avatar
Nora
Site Admin
Posts: 2155
Joined: Sun Jul 04, 2004 5:03 am
Contact:

Re: <!--IFFieldName Issue

Post by Nora »

Do put a link to it here when it's done, we'd love to see it. :)
Post Reply