Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
If property equals then...
If property is not equal to 1 then { }
If 'heroDisabled' that is a true/false field is not equal to true, then....
@if {Umbraco.Field("heroDisabled") != '1') { @* then *@ }
? != operator cannot be applied
:-( help!
Just for shits and giggles!
<xsl:if test="$currentPage/heroDisabled != '1'"> <!-- then --></xsl:if>
I jest!
How about?
if (!Model.Content.GetPropertyValue<bool>("heroDisabled")) { }
Or if using dynamics?
if (!CurrentPage.heroDisabled) { }
Ahha! :-) I was clearly over complicating things.
What's the difference between the two? Performance? Readability? Explicitability (wow that's apparently a word!)
p.s Thanks
intellisense vs conciseness :-) I prefer the former...
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Razor Layout, if property equals then
If property equals then...
If property is not equal to 1 then { }
If 'heroDisabled' that is a true/false field is not equal to true, then....
@if {Umbraco.Field("heroDisabled") != '1') { @* then *@ }
? != operator cannot be applied
:-( help!
Just for shits and giggles!
<xsl:if test="$currentPage/heroDisabled != '1'">
<!-- then -->
</xsl:if>
I jest!
How about?
Or if using dynamics?
Ahha! :-) I was clearly over complicating things.
What's the difference between the two? Performance? Readability? Explicitability (wow that's apparently a word!)
p.s Thanks
intellisense vs conciseness :-) I prefer the former...
is working on a reply...