Copied to clipboard

Flag this post as spam?

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


  • Akeem 43 posts 198 karma points
    Mar 29, 2016 @ 17:18
    Akeem
    1

    Retrieve Model in surfaceController

    Actually i retrieved my model like this in the view

        IPublishedContent objBlogRoot = Model.Content.AncestorOrSelf("SmartBlogBlog");
        IEnumerable
        <IPublishedContent>
        colResults = null;
    
        colResults = Model.Content.DescendantsOrSelf("SmartBlogPost");
    

    Now i want to use a surfaceController .. Is there a way i can retrieve the mode l please?

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    Mar 29, 2016 @ 18:13
    Dennis Adolfi
    0

    Hi Akeem. I'm not sure exactly what you mean but maybe with some more info I can help out:

    Why do you want a SurfaceController?

  • Akeem 43 posts 198 karma points
    Mar 29, 2016 @ 22:54
    Akeem
    0

    I WANT TO MAKE AN AJAX CALL TO THE CONTROLLER . BECAUSE WHEN I DO

       $(".myblogs").load("@Umbraco.NiceUrl(1121)?Gr=@intItemsPerPage", function () {
    
        });
    

    THIS IS RETURNING AN ENTIRE PAGE . a page inside a page . So am thinking maybe i can make an ajax call to the controller and retrieve just the model , pass each model of specific id to my view .

    please i hope you understand what i mean

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    Mar 30, 2016 @ 05:45
Please Sign in or register to post replies

Write your reply to:

Draft