Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Can I have selected post and a blog page too?

  • #10737
    Avatar photo[anonymous]

    I have a post that is built to be a landing page with lots of custom content.  I have set it as the post that the Front Page displays in my theme settings.  I would still like to have a blog page also that is linked from the menu.  I feel like this should not be hard to do, but cannot seem to figure out what the special sauce is.

    #10739
    Avatar photo[anonymous]

    It sounds like you’re trying to set up an alternative index page. Check out this forum post for some insight: https://forum.getpublii.com/topic/mercury-theme-filter-help/

    This blog post should also help: https://cv.domagic.site/posts/alternative-post-template-with-filter-for-publii-cms

    In essence: you’ll want to create a post template that is identical to index.hbs, but you’ll want to swap out any index-specific Handlebars tags/helpers with post ones.

    Then, create a post using that template, and map your menu item to that post.

    Another, simpler alternative if you only have one author: set that menu item to the author page / post directory. You can edit the author hbs file for further customization.

    #10742
    Avatar photo[anonymous]
    [anonymous] wrote:

    In essence: you’ll want to create a post template that is identical to index.hbs, but you’ll want to swap out any index-specific Handlebars tags/helpers with post ones.

    Then, create a post using that template, and map your menu item to that post.

    Another, simpler alternative if you only have one author: set that menu item to the author page / post directory. You can edit the author hbs file for further customization.

    That makes sense.  I was trying to puzzle that out in my mind, thinking that was the way, but I could not quite figure out how to start.

    Thanks so much.

    #10852
    Avatar photo[anonymous]
    [anonymous] wrote:

    This blog post should also help: https://cv.domagic.site/posts/alternative-post-template-with-filter-for-publii-cms

    The blog post was most helpful, and I have the blog list working with one exception.  It will not paginate.  I can tell that the paginate hbs file is being included but suspect the context it is being used in is causing an issue.  I am not really sure what is happening in the code though – so not sure what I should be looking at.

    I am attaching my custom post-bloglist.hbs file so you can see what I have done.  I have not altered any other files.

    I am using the default theme – Simple

    post-bloglist

    #10918
    Avatar photo[anonymous]
    [anonymous] wrote:
    [anonymous] wrote:

    This blog post should also help: https://cv.domagic.site/posts/alternative-post-template-with-filter-for-publii-cms

    The blog post was most helpful, and I have the blog list working with one exception. It will not paginate. I can tell that the paginate hbs file is being included but suspect the context it is being used in is causing an issue. I am not really sure what is happening in the code though – so not sure what I should be looking at.

    I am attaching my custom post-bloglist.hbs file so you can see what I have done. I have not altered any other files.

    I am using the default theme – Simple

    post-bloglist

    So I was doing some reading and came across this snippet in the documentation:

    Homepage, tag, and author pages support pagination. It is based on a few global variables and helpers. You can use pagination not only for creating pagination links, but also for a link with `rel=”prev”` or `rel=”next”` attributes.

    I added some code to return the value of @pagination just to be sure.  It is false.  Is there any way to get Publii to paginate a file other than Homepage, tag and author?

    Thanks

    #11385
    Avatar photo[anonymous]

    Were you able to solve this?