Have set up a checkbox field called travel for the suggestlink.tpl, when setting the field up in admin have tried it with a value in and also without to see if that was the problem
On the details page I have tried this
<div class="details"><span class="labels"> <IF>{LINKCHECKED[LINKTRAVEL]}</IF>Travel: YES CAN TRAVEL</span> </div>
And this
<IF {LINKCHECKED[LINKTRAVEL]}><div class="details"><span class="labels">Travel: YES CAN TRAVEL</span> </div></IF>
What I am trying to do is if the checkbox has been checked on submission is to display something like this - Travel: Yes can travel - on the details.tpl
Clearly I am doing something wrong as I can get dropdown list selections to display without problem
Instead of putting <IF {LINKCHECKED}[LINKTRAVEL]> etc etc </IF>
I put <IF {LINKCHECKED}[travel]> etc etc </IF> and it worked ok
Paul - as you have probably guessed by now I have a very limited knowledge of PHP is the [ open closed brackets ] a function of PHP or something you have coded for WSN I know the {} is used in PHP - always keen to learn something new
Just begining to realize how useful the IF Else statements can be
Reckon it's about time I got myself a decent beginners book on PHP
Comments on Problem using information from checkbox
Member
Usergroup: Customer
Joined: Dec 16, 2006
Total Topics: 9
Total Comments: 29
Hi Paul,
Have set up a checkbox field called travel for the suggestlink.tpl, when setting the field up in admin have tried it with a value in and also without to see if that was the problem
On the details page I have tried this
<div class="details"><span class="labels"> <IF>{LINKCHECKED[LINKTRAVEL]}</IF>Travel: YES CAN TRAVEL</span>
</div>
And this
<IF {LINKCHECKED[LINKTRAVEL]}><div class="details"><span class="labels">Travel: YES CAN TRAVEL</span>
</div></IF>
What I am trying to do is if the checkbox has been checked on submission is to display something like this - Travel: Yes can travel - on the details.tpl
Clearly I am doing something wrong as I can get dropdown list selections to display without problem
What am I doing wrong?
Thanks Mel
Member
Usergroup: Customer
Joined: Dec 16, 2006
Total Topics: 9
Total Comments: 29
Problem sorted,
Instead of putting <IF {LINKCHECKED}[LINKTRAVEL]> etc etc </IF>
I put <IF {LINKCHECKED}[travel]> etc etc </IF> and it worked ok
Paul - as you have probably guessed by now I have a very limited knowledge of PHP is the [ open closed brackets ] a function of PHP or something you have coded for WSN I know the {} is used in PHP - always keen to learn something new
Just begining to realize how useful the IF Else statements can be
Reckon it's about time I got myself a decent beginners book on PHP
Mel
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It's not PHP, it's just my syntax for passing things to template functions.
I know the {} is used in PHP
PHP's in-build templating mechanism uses {$variablename}, but that's actually just incidental.
WSN Links can tie into custom PHP functions with template functions though.