Copied to clipboard

Flag this post as spam?

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


  • Robert J. Bullock 386 posts 405 karma points
    Jul 21, 2011 @ 19:31
    Robert J. Bullock
    0

    We Are SERIOUSLY in Need Of Some Definitive Examples!

    I am having a hell of a time figuring out how to do the simplest things with Razor... I think we need an updated, consolidated and definitive set of examples:

    • List child nodes, list by type, date, etc.
    • List sibling nodes, list by type, date, etc.
    • Retrieve & interate all children of root content node.
      (Still haven't figure this one out, though I've seen about a dozen different approaches.)
    • Retrieve and display media.
    • Use parameters with practical examples.
    I realize you can find examples to do all of this, but the WIKI pages on Razor are AWFUL, poorly written and confusing as hell. We just need ONE good page with some simple examples for these routine tasks.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 22, 2011 @ 08:01
    Dirk De Grave
    0

    Hi Robert,

    Have you checked the blog posts about Razor functionality

    Of course it can always get better, but at least you get some more info and practical examples of the Razor functionality. If you can't find the answer to a specific question, just ask and I'm sure you'll get a answer from the community.

     

    Cheers,

    /Dirk

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Jul 22, 2011 @ 09:04
    Chris Houston
    0

    Hi Robert,

    When you do find the answer to your questions, do update the Wiki pages you are referring too, that way the next person who is stuck will not go through your pain :)

    ( and that might be me, as I have yet to venture down the Razor route :) )

    Cheers,

    Chris

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 22, 2011 @ 15:04
    Sebastiaan Janssen
    0

    First of all, do check the Template editor in Umbraco's backend, there's some predefined scripts in there with loads of comments that will provide a great starting point:

    I must say that Razor in 4.7.1 (beta coming in a couple of weeks) will be loads better and I know there are good blog posts coming from Gareth (who implemented the new functionality). These new bits will make your life as a developer even easier.

    I know that doesn't help much for now, but I have been very keen to reply to all of the questions in this forum, and others are closely monitoring it as well. If you get stuck, just post and you'll soon have an answer. :)

  • Robert J. Bullock 386 posts 405 karma points
    Jul 22, 2011 @ 16:16
    Robert J. Bullock
    0

    Okay, that's weird... those aren't the Razor inline macros I get. I get a much shorter list in that same drop down and I am running 4.7.0...

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 22, 2011 @ 16:28
    Sebastiaan Janssen
    0

    Ah yes, I see, I'm using the umbraco.MacroEngines.dll from the latest 4.7.1 nightly. So it's coming, a bit more patience! :-)

Please Sign in or register to post replies

Write your reply to:

Draft