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
Hello,
Again i am not able to use the filters which are described in the razor cheet page.
I am trying to loop throug some items and filter the first 5 items and the last 5 items
If i try to use
foreach(dynamic item in Model.AncestorOrSelf().footerLinksRight.Where(@i < 6)
I get an error:
'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'Where'
I also tried:
foreach(dynamic item in Model.AncestorOrSelf().footerLinksRight.Take(5)
which shows an error:
umbraco.MacroEngines.DynamicXml' does not contain a definition for 'Take'
Its really hard for me to change from xslt to razor if mostly of the described features in the cheet sheat are not working for umbraco 4.7.0
I am not able to update to any newer version so is there any fix to get all of this razor stuff working also for umbraco 4.7.0?
Thanks a lot
As said before, you can copy JUST the umbraco.MacroEngines.dll from 4.7.2 into your 4.7.0 version and that will only have effect on your razor scripts, it won't affect anything else.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
looping issue with razor and umbraco 4.7.0
Hello,
Again i am not able to use the filters which are described in the razor cheet page.
I am trying to loop throug some items and filter the first 5 items and the last 5 items
If i try to use
foreach(dynamic item in Model.AncestorOrSelf().footerLinksRight.Where(@i < 6)
I get an error:
'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'Where'
I also tried:
foreach(dynamic item in Model.AncestorOrSelf().footerLinksRight.Take(5)
which shows an error:
umbraco.MacroEngines.DynamicXml' does not contain a definition for 'Take'
Its really hard for me to change from xslt to razor if mostly of the described features in the cheet sheat are not working for umbraco 4.7.0
I am not able to update to any newer version so is there any fix to get all of this razor stuff working also for umbraco 4.7.0?
Thanks a lot
As said before, you can copy JUST the umbraco.MacroEngines.dll from 4.7.2 into your 4.7.0 version and that will only have effect on your razor scripts, it won't affect anything else.
is working on a reply...