Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • dominik 711 posts 733 karma points
    Jul 31, 2012 @ 13:10
    dominik
    0

    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

  • Sebastiaan Janssen 5058 posts 15520 karma points MVP admin hq
    Jul 31, 2012 @ 16:35
    Sebastiaan Janssen
    0

    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. 

Please Sign in or register to post replies

Write your reply to:

Draft