Get Umbraco Certified in October

5 courses in 4 different countries across 2 continents leaves no excuse.

Attend courses in the Netherlands, UK, USA and at Umbraco HQ in Denmark.

See the schedule and read more about our training here.

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 332 posts 327 karma points
    Jul 21, 2011 @ 19:31
    Robert J. Bullock

    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 Grave5225 karma points admin
    Jul 22, 2011 @ 08:01
    Dirk De Grave

    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.




  • Chris Houston819 karma points admin c-trib
    Jul 22, 2011 @ 09:04
    Chris Houston

    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 :) )



  • Sebastiaan Janssen9458 karma points admin mvp hq
    Jul 22, 2011 @ 15:04
    Sebastiaan Janssen

    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. Bullock327 karma points
    Jul 22, 2011 @ 16:16
    Robert J. Bullock

    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 Janssen9458 karma points admin mvp hq
    Jul 22, 2011 @ 16:28
    Sebastiaan Janssen

    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 is the community mothership for Umbraco, the open source cms. With a friendly forum for all your questions, a comprehensive documentation and a ton of packages from the community. This site is running Umbraco version 7.3.0