 | |  |
 |

jeremed
User
Dec 20, 2006, 9:28 PM
Post #1 of 5
(389 views)
Shortcut
|
|
TemplateIF's not working
|
Can't Post
|
|
I am trying to use the code below to alternately display one block of code or the other. However, it seems as if the templateIf's are being ignored completely. I use the placeholderlist command to make sure that the values from the checkboxes are the value I'm testing for and they are. Whenever I publish the page, both blocks of code execute even though one should not. Am I missing something simple that would account for this behavior? <?php $counter = 0; ?> <!-- template insert : $articleList$ --> <!-- templatecell : articleRow --> <!-- templateIF : $article.membershipHeading$ eq "Yes" --> </tr> <tr> <td class="membershipHeading" colspan="3"> <h2 class="greenNoSpace">$article.summary$</h2> </td> </tr> <tr> <!-- /templateIF --> <!-- templateIF : $article.membershipHeading$ eq "No" --> <td>$article.summary$</td> <?PHP $counter++; if ($counter == 3) { echo "</tr><tr>"; $counter = 0; } ?> <!-- /templateIF --> <!-- /templatecell : articleRow -->
|
|
|  |
 |

dbramley
User
Dec 21, 2006, 1:16 AM
Post #2 of 5
(382 views)
Shortcut
|
|
Re: [jeremed] TemplateIF's not working
[In reply to]
|
Can't Post
|
|
Hi, Just to try and help you a bit - have you created a custom field in the database called membershipHeading and set it to a yes / no checkbox? You then create an article and set the required yes / no for this field? Not sure if this would make a difference but when I create IF statements I always do it this way; <!-- templateIF : $article.membershipHeading$ eq "No" --> to <!-- templateIF : $article.membershipHeading$ ne "Yes" --> Dan
Stockton on Tees | Hartlepool | Middlesbrough | Sunderland
|
|
|  |
 |

jeremed
User
Dec 21, 2006, 5:07 AM
Post #3 of 5
(377 views)
Shortcut
|
|
Re: [dbramley] TemplateIF's not working
[In reply to]
|
Can't Post
|
|
Thank you for replying. I have done those things. I have created checkboxes and other fields and used templateif's many times before on other templates and installations. I don't know why it's not working this time. I'm starting to think that my installation may be corrupt. All of the code for the templateif's I used in this particular template is showing up in the html source instead of being processed.
|
|
|  |
 |

ross
Staff
/ Moderator

Dec 21, 2006, 1:09 PM
Post #4 of 5
(366 views)
Shortcut
|
|
Re: [dbramley] TemplateIF's not working
[In reply to]
|
Can't Post
|
|
Hi there. Thanks for posting! I am not quite sure just yet what's going on there so I was wondering if you could send me a support request so I can test a couple things out for you? Here's a link: https://www.interactivetools.com/support/email_support.cgi I am sure it isn't going to be anything major so as soon as I have had a look, I should be able to narrow it down for you . ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

jeremed
User
Dec 21, 2006, 3:32 PM
Post #5 of 5
(360 views)
Shortcut
|
|
Re: [ross] TemplateIF's not working
[In reply to]
|
Can't Post
|
|
Thanks. I submitted the request.
|
|
|  |
|