New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Automatically select a template based on fieldset

Daniel Edwards June 15, 2020 by Daniel Edwards

Is it possible to have the template for a new page automatically be selected based on the fieldset being used?

For example, a client using the CP creates a new page. They select the "Long-Form Content" fieldset, and so naturally the associated template should be used. But rather if they selected the "Collection Gallery" fieldset, then they'd want that template selected.

As it is, so far as I understand it, there'd either need to be a template field in each fieldset, or the client would have to manually edit the page's YAML file (not ideal).

Any suggestions, or something I missed?

Answered by Rob de Kort!
>>>>>>> Answered <<<<<<<
2 Replies
2 Followers