Allow UI template to look up other pages and files
While the UI model provides access to a wealth of information about the current page, it doesn't provide a way to access information about other pages or files. In other words, the UI template cannot look up arbitrary pages and other files in the content catalog.
Exposing the content catalog to the UI template via the UI model would open up a lot of doors for what's possible, particularly for navigation bars and landing pages.
Since exposing the content catalog would drastically increase the surface area of the API, we may want to consider exposing a proxy that has a more limited set of methods. Those methods would include:
- findBy
- getById
- getComponentVersion (note that getComponent is already covered by site.components.NAME) ** or we could reconstruct components.NAME.versions to also be a map
- getSiteStartPage (maybe this should be mapped on site as site.startPage?)
(We may consider adding other methods in the future that would make it easier to access other pages).
Instead of exposing the content catalog, we could also consider exposing functions to look up files/pages by ID or criteria.
The overall goal (i.e., done criteria) is for a template to be able to access another file or page in the content catalog.