Why the result of the Umbraco.Content is always null in SurfaceController
We have a master / detail document type similar to blog & posts and we need the posts to be filtered according to some filters chosen by the users. This required an ajax request to be send to a action in the controller to return the partial view and update the HTML element with the filtered result.
As I have understood, these custom actions need to be inside a surface controller to be found in the routing system. This is working well, however, inside the action, the response of the IPublishedContent model = Umbraco.Content(id) is null while the same has results in another macro.
I was just wondering if there's another best practice for this situation or how this null result can be solved.
Why the result of the Umbraco.Content is always null in SurfaceController
We have a master / detail document type similar to blog & posts and we need the posts to be filtered according to some filters chosen by the users. This required an ajax request to be send to a action in the controller to return the partial view and update the HTML element with the filtered result. As I have understood, these custom actions need to be inside a surface controller to be found in the routing system. This is working well, however, inside the action, the response of the
IPublishedContent model = Umbraco.Content(id)
is null while the same has results in another macro.I was just wondering if there's another best practice for this situation or how this null result can be solved.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.