Sorry if this is a duplicate post or bug but I was unable to search got the string _@ and was too lazy to try different "safe" alternatives.
Situation: Lets assume I have a macro that lists all images in said folder clicking on an image shows a lightbox which is pretty standard stuff.
As part of lightbox you can use an anchor tag with rel attribute to group images <a rel="gallery_12" however when trying to use the syntax <a rel="[email protected]" razor does not seem to recognise/render/output the Model.Id property.
Solution: use a dash instead of an underscore which goes against umbracos freedom =P
Does anyone have any other solutions for usng _ without creating a variable and setting a string with the class name which I am currently doing?
Umbraco 4.7 Razor Bug?
Sorry if this is a duplicate post or bug but I was unable to search got the string _@ and was too lazy to try different "safe" alternatives.
Situation:
Lets assume I have a macro that lists all images in said folder clicking on an image shows a lightbox which is pretty standard stuff.
As part of lightbox you can use an anchor tag with rel attribute to group images <a rel="gallery_12" however when trying to use the syntax <a rel="[email protected]" razor does not seem to recognise/render/output the Model.Id property.
Solution:
use a dash instead of an underscore which goes against umbracos freedom =P
Does anyone have any other solutions for usng _ without creating a variable and setting a string with the class name which I am currently doing?
Cheers
Dan
Make it explicit by using braces:
"gallery_@(Model.Id)"
is working on a reply...