I am trying to se a condition for displaying pagination in the footer if there is just one page
So i have something like this in footer {{t “Page {page} of {pages}” page=page pages=pages}}
and it desplays: “Page 1 of 1”
and i would like to hide it if there is only one page
How could i achieve that using handlebars?
ps: i have tried looking at #has but with no luck or maybe i am missing something…
Oh sorry I misunderstood what you were trying to do. There’s no way to achieve that with pure handlebars, you’d need to do some combination of the #get helper and clientside JS
I am curious of what other users that have more experience customizing ghost theme via handlebars feel about it.
Especially since we can not register new helpers / mess with the core
Is it just me or handlebars really limits what you can and can not do with your theme?
For such a trivial thing to do it seems rather hard to achieve any level of customization
@fruit are you doing this inside the pagination.hbs file? If so you have access to the prev and next attributes so you could use a slightly ugly workaround
partials/pagination.hbs:
{{#if prev}}
{{> "pagination-content"}}
{{else if next}}
{{> "pagination-content"}}
{{/if}}
partials/pagination-content.hbs:
{{t "Page {page} of {pages}" page=page pages=pages}}
How easy is it to bring new functionalities into ghost?
I am not talking about customizing the theme but more complex subjects like memberships, say i want to build a follow system where users can follow each other and get notified on new content release. How easy or hard would you guys think it would be using ghost.
As you can tell i am still deciding on using Ghost or something else.
I loved the simplicity and the whole feel to it but i wonder if it is suited for developing a bigger project like handling new functionalities, users, follow system and so much more.
Is ghost the right tool for me or should i look to something else?
Ghost doesn’t yet have an plugin system (although it’s planned) and has so far been very much focused on being a publishing platform rather than a CMS/framework to build custom apps from.
The specific functionality that you’re talking about - memberships, newsletters, comments, etc - is a core priority that we’ll be starting with in earnest very shortly.
that would sound amazing but from what i read there are no ETAs or roadmaps for that. So there is no way of knowing when and if that will become a reality.
Anyway your answers were really helpful