Closed rudyrigot closed 10 years ago
Actually, another good reason to expose the Api
object: it's not possible to build a select box allowing the authenticated visitor to choose which content release they wish to preview, since the list of accessible content releases is in the Api
object.
This would all be possible with PR #13, so this issue is not needed anymore.
I'm looking into your library today, and I'm noticing that you are abstracting a lot how the kit performs queries. It's fine by itself, but it suppresses a key upside of the official kit: the ability to chain calls to specify your query. For instance:
I wonder how best to expose this with the current approach. Maybe simply with a
Prismic.api
so that we can do stuff such asPrismic.api.forms('products').query('[[:d = at(document.tag, "featured")]]').orderings('[product.price]').pageSize(10).page(2).submit()
. This might require to extend the originalSearchForm
object so thatsubmit()
returns a promise, but that could work!Notice that I haven't used
ref
. I like the way you've abstracted the call toref
in a clean way, still making it possible to pass another ref in the page's URL.I can totally make that happen, I just thought I'd reach out first to talk about how to do this best.