<!--IFFieldName Issue

Any trouble you encounter with the Pedias, here's the place to ask for help.

<!--IFFieldName Issue

Postby fridolinweiner » Sat Jun 02, 2012 12:25 am

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?
fridolinweiner
Contributor
Contributor
 
Posts: 5
Joined: Wed May 30, 2012 7:49 pm

Re: <!--IFFieldName Issue

Postby Conor » Sat Jun 02, 2012 3:01 am

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]-->
User avatar
Conor
Top Dog
 
Posts: 3752
Joined: Sat Jul 03, 2004 12:58 pm

Re: <!--IFFieldName Issue

Postby fridolinweiner » Sat Jun 02, 2012 5:41 am

You're the best!
The template will be soooooooo nice!
fridolinweiner
Contributor
Contributor
 
Posts: 5
Joined: Wed May 30, 2012 7:49 pm

Re: <!--IFFieldName Issue

Postby Nora » Sat Jun 02, 2012 10:46 am

Do put a link to it here when it's done, we'd love to see it. :)
User avatar
Nora
Site Admin
 
Posts: 1943
Joined: Sun Jul 04, 2004 5:03 am


Return to Support