I hope I’m missing something which would make things easier when revealed, but with what I got to learn about ghost handlebars this far, there’s no way to set custom variables and reuse them outside their scope.
When building queries, one may want to either include more than one specific set or explicitly exclude posts that were already displayed.
This can be done inside a wrapper
get but in a rather primitive way and it would take too much nesting, which it’s warned against anyway.
For example, I may want to do several consecutive loops and exclude whatever was already displayed before. A global array of exclusions would come very handy for that instead of having to nest gets.
Or do more than one query at once, build an initial list of posts and then sort them out in a second step.
It would be even greater if they could be pushed to a key-value array in order to be able to assign sorting weights to them.
I’m aware that this sounds like a lot of effort for something that few people are interested in and I’m not too aware of how complicated it may be - but I’m writing this hoping that there’s some not-too-difficult way to achieve what I’m looking for that I might have missed.