Difference between revisions of "Issues:026"
From its-wiki.no
Josef.Noll (Talk | contribs) (Created page with "{{Issue Template |Headline=Show only content if present #if statement |Issue Status=New |Issue Type=Query |Priority=Normal |Description=I don't understand the if statement. Us...") |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Issue Template | {{Issue Template | ||
|Headline=Show only content if present #if statement | |Headline=Show only content if present #if statement | ||
− | |Issue Status= | + | |Issue Status=Accepted |
|Issue Type=Query | |Issue Type=Query | ||
|Priority=Normal | |Priority=Normal | ||
|Description=I don't understand the if statement. Used | |Description=I don't understand the if statement. Used | ||
− | + | {{#if:[[Web::{{{Web|}}}]] | Contact info:<span style="font-size: 120%;" > [[Web::{{{Web|}}}]]</span> | }} | |
− | + | ||
+ | to not show anything if the user does not have a "home page address" provided, but "Contact info:" is shown regardless. | ||
|Page Link=http://its-wiki.no/wiki/Mette_Johnsrud | |Page Link=http://its-wiki.no/wiki/Mette_Johnsrud | ||
|Created By=Josef.Noll | |Created By=Josef.Noll | ||
|Creation date=2017/09/04 | |Creation date=2017/09/04 | ||
+ | }} | ||
+ | {{Response Template | ||
+ | |Response=The #if statement will always trigger because you are setting a default for the field of <nowiki>"http://..."</nowiki> | ||
+ | So <nowiki>{{{Web|}}}</nowiki> will always contain at least this value! :) | ||
+ | |||
+ | I'll implement a different way to add on the http:// part to the string in the template. That way, if the user leaves the field blank, the #if will trigger because there will be no value in the field. | ||
+ | |Response Date=2017/09/15 | ||
+ | |Response By=Neill | ||
}} | }} |
Latest revision as of 13:16, 15 September 2017
Go to Issue Log page | ||||||||||||||||||
|
|