silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
720 stars 820 forks source link

Action templates in a sub-folder #11226

Closed Firesphere closed 1 month ago

Firesphere commented 1 month ago

Description

Current status: When I want an action on a controller, to have its own template, I create a template named MyPage_action in the appropriate Vendor\Project\Page\Layout folder.

I think it would be highly useful, to add a feature, that allows these "action templates" to live in their own folder, named after the page. So in the case of the action test on the Pagetype MyPage, a template in themes/templates/Vendor/Project/Page/Layout/MyPage named simply test.ss, would be picked up as the template for this action.

This would allow templates to be more granular, and be better located, compared to the requested url and the actual template location.

Additional context or points of discussion

I don't understand what the checkbox "You intend to implement the feature yourself" means. Does that mean you expect me to build it for you?

Validations

GuySartorelli commented 1 month ago

The "You intend to implement the feature yourself" checkbox is required to create a feature request issue - I'm guessing you ticked it, then unticked it after creating the issue? Since it seems like you don't intend to implement this feature, I'll close the issue per our documented contribution guidelines.

In order to gain interest and feedback in your feature, we encourage you to present it to the community through the community channels.