Sign in

Can I have selected post and a blog page too?

  • This topic has 4 replies, 2 voices, and was last updated 1 month ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10737
    Avatar photobjazmoore

    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 photocandidexmedia

    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 photobjazmoore
    candidexmedia 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 photobjazmoore
    candidexmedia 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 photobjazmoore
    bjazmoore wrote:
    candidexmedia 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.