Copied to clipboard

Flag this post as spam?

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


  • Dan 6 posts 27 karma points
    Jan 06, 2014 @ 17:35
    Dan
    0

    Footer Post Widget

    I am looking to be able to display the lastest post in the footer, sitewide. The site structure is as follows:

    Home
    - Blog Landing

    Most of the existing widgets rely on the widget being on a page in a particular place, I need to break out of that.

    What would you recommend?

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jan 06, 2014 @ 18:22
    Anthony Dang
    0

    You can either reuse or copy the existing latest posts widget.

    var nodes = PostService.Instance.GetPosts(Model.Content).Take(itemLimit).ToIPublishedContent(true);

    The itemLimit can be replaced with 1 if thats all you want.

     

  • Dan 6 posts 27 karma points
    Jan 07, 2014 @ 11:36
    Dan
    0

    I tried that, but I'd only get it on the home page and blog landing page, not on other children of the home node. In the end I went for a simple xslt solution, though it might be good to create a specialised widget for displaying the latest post (with excerpt and read more link) for use anywhere in a site.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jan 07, 2014 @ 16:02
    Anthony Dang
    0

    I think this widget might be what you're looking for : uBlogsyWidgetListPostsForHome.cshtml

     

     

  • 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.

Please Sign in or register to post replies