Sign in
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.

Show container only once on front page?

  • This topic has 3 replies, 2 voices, and was last updated 7 months, 2 weeks ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10298
    Avatar photospecimen65
    I have a container that I only want to show on the front page.
    Wondering what is the syntax for the conditional logic I can wrap around the div in the theme’s override of index.hbs to only show it once on the front page and not on the subsequent “previous” and “next” pages?
    <h2 class="blog_post_heading">some text here</h2> 

     

    #10299
    Avatar photoBob
    {{#if @renderer.isFirstPage}}
        ...
    {{/if}}
    

    More about it: https://getpublii.com/dev/renderer-global-variable/

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #10304
    Avatar photospecimen65

    Thanks Bob!  These docs are excellent.

    #10306
    Avatar photospecimen65

    Looks like this worked out perfectly: https://oldschooltrainer.com

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