Copied to clipboard

Flag this post as spam?

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


  • Sebastian Dammark 583 posts 1407 karma points
    Dec 05, 2011 @ 00:04
    Sebastian Dammark
    1

    What does the Razor model look like ?

    Hi Folks

    What does the Razor modle look like ?

    I XSLT we can do like below or use XMLDump:

    <textarea>
        <xsl:copy-of select="$currentPage" />
    </textarea>

    What are the equivalent in Razor ?

  • Sebastiaan Janssen 5058 posts 15520 karma points MVP admin hq
    Dec 05, 2011 @ 09:55
    Sebastiaan Janssen
    1

    There is no equivalent. You can have a look in the umbraco.config or include just this XSLT macro in each page to get the xml back. The umbraco model maps to the xml anyway.

    Alternatively, you could jump into debug and have a look at the model's content in there.

  • Sebastian Dammark 583 posts 1407 karma points
    Dec 05, 2011 @ 11:16
    Sebastian Dammark
    0

    So, in other words, I'll just keep using Greystate's XMLDump package, when I wanna go back memorylane (XML/XSLT) :)

    Thanx alot for answering all my questions ...

     

     

  • Sebastiaan Janssen 5058 posts 15520 karma points MVP admin hq
    Dec 05, 2011 @ 11:55
    Sebastiaan Janssen
    0

    There is another option actually, but it requires you to use uSiteBuilder (but once you get into it, it is REALLY COOL!) and this T4 template: http://our.umbraco.org/projects/developer-tools/usitebuilder/usitebuilder-support/25697-uSiteBuilder-and-strongly-typed-views-with-razor

    But it's a bit advanced and no guarantees it will work, I have yet to play with it. But this should give you full intellisense in VS so you know exactly what's in the model.

Please Sign in or register to post replies

Write your reply to:

Draft