Copied to clipboard

Flag this post as spam?

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


  • Morten Eberhardt Lund 17 posts 107 karma points
    Sep 18, 2017 @ 10:28
    Morten Eberhardt Lund
    0

    Load more, lazy load or whatever it's called.

    What are you people using to do a load more of blog posts in Umbraco? I think I've searched the most of the web, to find a solution to this problem. Everything I do to make this work has failed. Is there an Umbraco project which can do the job? Or what am I supposed to do here?

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Sep 18, 2017 @ 11:16
    Alex Skrypnyk
    0

    Hi Morten

    Are you using some blog package for Umbraco?

    Why your code is failed? Can you show what code are you using?

    Thanks,

    Alex

  • Morten Eberhardt Lund 17 posts 107 karma points
    Sep 18, 2017 @ 13:09
    Morten Eberhardt Lund
    0

    Hi Alex,

    I don't use any blog package, I have been trying to make my own, but the only thing I'm missing, is the load more function when you scroll down the page, it should load more posts.

    I'm not the best at the advanced code like controllers and that, and that is where I think my code fails.

    I don't have much to show, but I will try my best.

      @foreach (var post in CurrentPage.Children)
    {
        <div class="col-sm-4" style="padding-bottom: 60px;">
            <div class="content equal">
                <a href="@post.Url">
                    <img class="" style="no-repeat; display: block; max-width: 100%; background-size: cover" src="@post.baggrundHeader" />
                    <div style="padding-top: 10px; color: #222;" class="date">@post.CreateDate.ToLongDateString()</div>
                    <h2 style="padding-top: 10px; font-size: 24px;" class="">@post.Name</h2>
                </a>
            </div>
            <p>@Umbraco.Truncate(post.beskrivelse, 240, true)</p>
        </div>
    }
    

    This my partial for the blog posts.

    And I render it through this code:

    @{ Html.RenderPartial("blog Overview"); }
    

    What I've been trying to achieve, is to give the posts a class with AJAX, Jquery etc. and nothing has worked.

    I've stumbled across many articles, where they are coding this solution with controllers. Is that the only approach to solve this? Isn't there anything easier?

Please Sign in or register to post replies

Write your reply to:

Draft