I need to do some new functionality which allow users to select some feature in Page Metadata and with this check selected the Page should be published with another Page Template (this Page Template includes another code and another extension). Is it possible to do that with Core Service, via Templating, Anguilla Framework or some develop in the Event System? Thanks in advance.
I'm definitely a fan of feature-based CMS development or design where your editor's selection can adjust backend or website functionality. Your content model seems like a familiar approach, though some background could help.
After working in product development, I'd also recommend:
- Going for the basics, or templating in this case. Based on the editor's selection change what you render.
- Putting code where you want to maintain it (templating or views if you render in delivery)
- Validating your end-to-end solution with users, developers, and however you handle support
If possible, I'd really consider if the user could just change the template themselves.
Here's why I wouldn't recommend the other approaches as a first choice, at least without a good reason to adjust the approach.
GUI extensions are excellent for adjusting your editor's experience but your logic is already covered by the editor's selection and any templating or view logic you develop.
It also depends on how much you want to maintain such code.
@Nickoli's recommendation for a Custom Page could indeed help for configuration and might be easier to maintain and upgrade. But I'd only consider the Core Service if you're changing other items in the CMS, especially since Custom URLs already give you access to a script that lets you manipulate fields selections in a given form view.
Perhaps you might change the selected template when the editor selects a specific keyword, but the change won't be as clear to the user ("why did the template change?") and I can see problems having to revisit this for every new "feature" and adjustment.
If you really need to change the rendered output, it makes sense to put that logic with whatever renders your output (in Content Management or Content Delivery). Automation through the Event System seems like overkill in this case.
Finally, it'll also depend on what you're willing to build and maintain while balancing the current use case against potential changes.