Umbracians for Unicef - the friendly fundraising
In the spirit of holidays and humanity, we started a fundraising for Unicef. You won't believe what we could change if every visitor on Our Umbraco donated a dollar or euro. Click and find out!
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:
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.
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 :) )
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. :)
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...
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! :-)