I wanted to point to a Tailor record from a theme configuration file (which is a yaml file with traditional field types). Specifically I wanted to display a dropdown with all the Tailor records of a specific handle in my theme settings.
In this context the field types Mixin
and Entries
are not available.
So I decided to take a contrived route by creating a traditional formwidget called “publicationpicker”.
Publications here being part of my Tailor blueprint “Library\Publication” of the type stream
.
But, knowing October CMS and its simplicity, my gut tells me this is much too complex for the goal I wanted to reach.
Some details about what I wanted to attain:
-
Back-end: Dropdown in the back-end that looks for publications of all sites in the multisite environment, not just the context of the current site.
-
Front-end: Display the record information (ignoring the site context the visitor is currently on) and linking to the original publication on the original site.
The idea would be that the administrator can select a publication of a specific site to be displayed, keeping its original context, and disregarding the site context the current user is on.
As said I managed to solve it, but in a much too complicated way, and I’d love some insights on this.