I am quitenewRazor in Umbraco. Iused toworkwithXSLTwhen I'm working in Umbraco. But I amnowbegunlooking atrazor, after havingbeen on theUmbracotraining.
How can Iaccess theXMLfrom"currentPage"inXSLT,can I doit this way.
But how can I access xml in Razor, I know that I access "currentPage" by @Model, but when I wrapped it in a textarea i only get this umbraco.MacroEngines.DynamicNode.
Being a Razor n00b myself I'm not sure this is even possible.
But I woud like to know what version of Umbraco you're using since and if you're using webforms or MVC since there is a difference wether you're using macroscript razor or MVC razor in Umbraco - it's 2 different implementations.
I just played around withtheUmbracoinstallation,which we usedtoUmbracotraining. And thinking when I could get the raw xml in XSLT maybe it was possible in Razor too.
Butif this is notpossible to do this it's fine. The question just came to me whenI was playing withtraininginstallation of Umbraco,and because I havean XSLTbackground.
I am usingUmbraco4.11.3,and Iusewebforms,andmacroscript basedRazor.
How to get the xml of "currentPage" in Razor
Hi,
I am quite new Razor in Umbraco. I used to work with XSLT when I'm working in Umbraco. But I am now begun looking at razor, after having been on the Umbraco training.
How can I access the XML from "currentPage" in XSLT, can I do it this way.
<teaxtarea><xsl:copy-of select="$currentPage" /></textarea>
But how can I access xml in Razor, I know that I access "currentPage" by @Model, but when I wrapped it in a textarea i only get this umbraco.MacroEngines.DynamicNode.
How can I get the raw xml.
Any help will be appreciated.
/Dennis
Hi Dennis
Being a Razor n00b myself I'm not sure this is even possible.
But I woud like to know what version of Umbraco you're using since and if you're using webforms or MVC since there is a difference wether you're using macroscript razor or MVC razor in Umbraco - it's 2 different implementations.
Looking forward to hearing more from you.
/Jan
Hi Jan,
I just played around with the Umbraco installation, which we used to Umbraco training. And thinking when I could get the raw xml in XSLT maybe it was possible in Razor too.
But if this is not possible to do this it's fine. The question just came to me when I was playing with training installation of Umbraco, and because I have an XSLT background.
I am using Umbraco 4.11.3, and I use webforms, and macroscript based Razor.
/Dennis
Hi, i think Umbraco.Core.Models.IPublishedContent is the extension you need.
I think its something like @Model.Content and then you will have access to all the nice helper methods.
Charlie :)
is working on a reply...