From: hrsms <web...@hr...> - 2013-10-31 13:02:45
|
Olivier-62 wrote > Here is the answer: learn smarty syntax! > > {if $f_X eq '' } > empty field > {else} > fieldX= $f_X > {/if} Olivier, I've been trying to do the same thing, and was encouraged when I saw your solution. But I cannot make it behave in my desired fashion: Here is my pretty tracker template page: {$f_128} {$f_115} ({$f_116}); {$f_117} ({$f_118}); {$f_119} ({$f_120}) {$f_113}, {$f_114} It is: Title credit1 (credit 1 type); credit2 (credit 2 type); credit3 (credit 3 type) Publisher, Date All fields on the second line are optional Example of current output: Bluenose Backman, Brian (); Backman, Phil (); () McClelland and Stewart, Limited, 1966 You can see that "credit 1 type", "credit 2 type", "credit3", and "credit 3 type" are empty. I tried using your solution, but if I try to include more than one {if}{/if} on the same line I get a syntax error message. If I put them on successive lines then the output is on successive lines, whereas I wish them to be on one line. Do you have any ideas on how to make this work? Thanks, Greg -- View this message in context: http://tikiwiki.1073613.n5.nabble.com/Conditional-display-in-pretty-trackerlist-tp27008p28853.html Sent from the TikiWiki - User mailing list archive at Nabble.com. |