i want to avoid using DynamicNode in v4.10+ and therefore would like to replace existing code to use the new goodies available as of v4.10+. But, not sure how to get hold of the "current page" when i'm in a Razor macro script?
yes, i know i can use the new stuff in views (ie, umbraco views inheriting from UmbracoTemplatePage but unsure what to use in my Razor macro scripts?
Using IPublishedContent in Razor macro's
hi,
i want to avoid using DynamicNode in v4.10+ and therefore would like to replace existing code to use the new goodies available as of v4.10+. But, not sure how to get hold of the "current page" when i'm in a Razor macro script?
yes, i know i can use the new stuff in views (ie, umbraco views inheriting from UmbracoTemplatePage but unsure what to use in my Razor macro scripts?
So, what to use instead of
@inherits umbraco.MacroEngines.DynamicNodeContext
and using @Current or @CurrentModel?
Cheers,
/Dirk
Maybe this little twitter conversation can help:
https://twitter.com/j_breuer/status/273368791247888384
https://twitter.com/j_breuer/status/273369591047147520
Otherwise perhaps the documentation can help: http://our.umbraco.org/documentation/master/Reference/Mvc/
Jeroen
is working on a reply...