You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Potentially allow lookups for keys not formatted like a path. This is mainly for allowing edge-case arbitrary content (I've been doing this), for example your content object could be shaped like:
that’s interesting. how does this work if we’re wanting to check global vs. local? for example page('child-page-example') vs. page('/root-page-example').
Not sure what you mean by global vs local? I guess another way to phrase what I mean here is maybe it's best not to do anything fancy when calling page(). Like, under the hood it could be as simple as:
Doing it this way might reduce complexity, in that it doesn't impose any restrictions on how your state is structured—all you have to do is pass in a key. That could be 'page-slug' or '/page-slug' or 'GLOBAL' or whatever key you want.
ah word, i meant root or relative, i guess. i think you’re right in that now we no longer have to compare against a pages object, so we can do something as simple as what you’re saying, which is sick.
Potentially allow lookups for keys not formatted like a path. This is mainly for allowing edge-case arbitrary content (I've been doing this), for example your content object could be shaped like:
Where
GLOBAL
is content that is general to the whole site. In your views you could then use something like:The text was updated successfully, but these errors were encountered: