Reputation: 155
What i'm trying to do:
I've found helpful answers like:
But I can't figure out what Controller or ControllerContext to pass in since I'm not in a Razor view or RenderMvcController.
Some help please?
Upvotes: 1
Views: 1138
Reputation: 1691
I normally call (with js, ajax, jquery) an Umbraco Surface controller and I pass my current page's node id. Then on server, I do:
var currentPage = Umbraco.TypedContent(myNodeIdParam);
From there I usually have enough context and I can return a partial view, passing it a model I want.
Hope this helps!
Upvotes: 2