Robin S Posted March 19, 2016 Share Posted March 19, 2016 Often I want to limit the placement of pages with a particular template to a particular parent page in the tree. Many times this parent page doesn't need to have it's own unique template, but I end up duplicating one of my existing templates (lets say it is "basic-page") just to make sure editors don't have the ability to mess up the placement of pages, and so I can make make use of the "Add New" shortcut. So I end up with "basic-page" and duplicates "basic-page-2", "basic-page-3", etc (naming is just for argument's sake). When templates are duplicated the problem isn't so much the template files, because it's easy to manually assign the file of basic-page to basic-page-2 and basic-page-3. The problem is maintenance - if I want to add a field to basic-page, change a label or field width override, etc, I now have to repeat these changes on multiple templates. It becomes difficult to keep the duplicated templates in sync. Having a template setting "Allowed page id(s) for parent" would avoid the need to duplicate templates in this situation. An alternative possibility is some system of template inheritance, but that's another kettle of fish. Link to comment Share on other sites More sharing options...
BitPoet Posted March 20, 2016 Share Posted March 20, 2016 You mean something like this? 6 Link to comment Share on other sites More sharing options...
szabesz Posted March 20, 2016 Share Posted March 20, 2016 Wow! Thanks for sharing, BitPoet! I suppose it works with 2.7.x and 3.x too, right? Link to comment Share on other sites More sharing options...
BitPoet Posted March 20, 2016 Share Posted March 20, 2016 (edited) Haven't tested it in 3.x yet, but I'm about to. Update: tested with 3.x and worked like a charm. Edited March 20, 2016 by BitPoet 2 Link to comment Share on other sites More sharing options...
Robin S Posted March 20, 2016 Author Share Posted March 20, 2016 You mean something like this?Superb! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now