Forum Discussion

Inactive User's avatar
Inactive User
8 years ago

Is there a Recent Blog Posts page like there is for forums? If so, where. If not, how to create one?

I created a component that displays recent blog posts by a given author to include in their profile. However, it only shows the LIMIT I set or all. I want to be able to go to an archive page / recent blog posts page i.e., VIEW ALL when there are more than, say 10 or 20 posts. 

 

Can I create an archive page similar to the forums recent post page, i.e., /t5/forums/recentpostspage/post-type/message/user-id/62383 

 

I'd think the link would be something like /t5/Blogs/recentpostspage/post-type/message/user-id/62383

 

I do notice there is a BlogArchivesPage w/ quilt, but no idea where to find it on the site. Am I missing something obvious?

 

On Lithium, I'm not a blogger, but on our site there are about 30 bloggers, and I'd like to be able to have this. Thoughts?

 

SuzieH got any magic bullets?


PS: I did get the information that there's this, /t5/blogs/blogarchivespage/blog-id/[your blog name here]/ but I'm looking more for a paginated tabular listing of an individual blogger's posts. Does that exist? If not, what's the best way to go about it?

  • SuzieH's avatar
    SuzieH
    8 years ago

    Hi Inactive User,

    You'll have to build a paging component. It would be great if we had some kind of default pager component that would take in specific parameters in order to be used with custom lists. If you want to post an idea...

     

    Check out the webuisupport FreeMarker context object

     

    I know you're not on the latest version of the Responsive skin, but here are the current variables we have for pagination classes for styling.  You'll have to check the _variables.scss file to see if your version of the skin supports these.

     

    //== Pagination
    //
    //##
    //$pagination-color: $text-color;
    //$pagination-bg: transparent;
    //$pagination-border: transparent;
    //$pagination-hover-color: $text-color;
    //$pagination-hover-bg: transparent;
    //$pagination-hover-border: transparent;
    //$pagination-active-color: $text-color;
    //$pagination-active-bg: transparent;
    //$pagination-active-border: transparent;
    //$pagination-disabled-color: $text-color;
    //$pagination-disabled-bg: transparent;
    //$pagination-disabled-border: transparent;

     

     

    And you might be able to make use of our Font Awesome variables for the pagination control icons: https://codepen.io/gxmikey/full/bZxrZY/

8 Replies

  • SuzieH's avatar
    SuzieH
    Khoros Alumni (Retired)
    8 years ago

    Hi Inactive User,

    From what I can tell, the way to get to that BlogArchivesPage is from the Blog Archives component. That component isn't certified for Responsive, so you can expect styling to be off and your mileage may vary, but you can still use that component to test out the BlogArchivesPage to see if it meets your needs. (I don't think it does.)

     

    The Blog Archives Page shows a set of links to blog articles for the blog in context by time range. (The time range is configurable in Admin.) Clicking on a grouped set of blogs, like "December 2016" takes you back to the Blog Page, filtered to that date range. 

     

     

    That's about as far as I can take you at the moment. I believe we have some rock stars on the Community who have built out custom message lists who can help you build the page you need.

     

    One last thing. You mentioned using LIMIT. Are you also using OFFSET for pagination? (Scroll up a bit in that link to see the start of the section. The heading is buried under the fixed header.)

     

     

     

     

  • Inactive User's avatar
    Inactive User
    8 years ago

    Thanks SuzieH,

    I will be using OFFSET, thanks. Is there a way to use Lithium's nice pagination indicators or will I have to whip up something that does the same function with the same structure?

  • SuzieH's avatar
    SuzieH
    Khoros Alumni (Retired)
    8 years ago

    Hi Inactive User,

    You'll have to build a paging component. It would be great if we had some kind of default pager component that would take in specific parameters in order to be used with custom lists. If you want to post an idea...

     

    Check out the webuisupport FreeMarker context object

     

    I know you're not on the latest version of the Responsive skin, but here are the current variables we have for pagination classes for styling.  You'll have to check the _variables.scss file to see if your version of the skin supports these.

     

    //== Pagination
    //
    //##
    //$pagination-color: $text-color;
    //$pagination-bg: transparent;
    //$pagination-border: transparent;
    //$pagination-hover-color: $text-color;
    //$pagination-hover-bg: transparent;
    //$pagination-hover-border: transparent;
    //$pagination-active-color: $text-color;
    //$pagination-active-bg: transparent;
    //$pagination-active-border: transparent;
    //$pagination-disabled-color: $text-color;
    //$pagination-disabled-bg: transparent;
    //$pagination-disabled-border: transparent;

     

     

    And you might be able to make use of our Font Awesome variables for the pagination control icons: https://codepen.io/gxmikey/full/bZxrZY/

  • Inactive User's avatar
    Inactive User
    8 years ago

    SuzieHCan you provide any information / guidance for the common.widget.pager component?

     

    Also, the webuisupport methods are intriguing but I'd love an example of how to apply it -- confusing out of context. 

     

    I'm trying to get it to work for a custom page with custom url properties to pull blog posts for a particular author. So I create a url to give me that, for example, t5/custom/page/page-id/BlogArticlesByAuthor/author-id/50

     

    In which case, I'm trying to pull author-id, which is not a ootb Lithium value (as far as I know), so it's throwing a Freemarker error. 

     

     

    <#assign author_id = webuisupport.path.parameters.name.get("author-id") />

     

     

    It seems that's because it doesn't exist on the path object, rather than just pulling it from the URL. So ... how do I get that to work? Do I build a url with a parameter as shown on the webuisupport object? The documentation is unclear.

     

     

    urls.fullyQualifiedPage
    .name.page_name
    .path("path_param_1_name","path_param_1_value")
    .query("query_param_1_name", "query_param_1_value")
    .build()

    // returns a fully qualified url to a page

     

    What does "fully qualified url" mean, and how do I create it? Etc.

     

    I can't make heads or tails of how to use webuisupport, at least in the context of a custom page or building a fullyQualifiedUrl. 

     

    Thanks!

  • SuzieH's avatar
    SuzieH
    Khoros Alumni (Retired)
    8 years ago

    Hi Inactive User

    The common.widget.pager isn't something that can be used in a customized way. It expects certain parameters from the underlying Java code. Exposing it in a way that would make it useful to customers would require core changes. I'm working on getting you more help with webuisupport. I'm hoping that PaoloTChiaraSDougS, or AdamA might be able to help with examples.

  • Inactive User's avatar
    Inactive User
    8 years ago
    While we're all here, can someone guide me in the use of visibility_scope in V1?