Pete Posted August 17, 2011 Share Posted August 17, 2011 Hi guys I do like the ability to be able to set the choice of child template for children of a given page based on the parent template (hope you're still with me), however I've had a couple of occasions where I would have liked to be able to set the option for more than one choice of template for a set of child pages but not necessarily the whole list of templates (I have lots of templates). Would it be possible in a future version to be able to select more than one template for child pages of a given page's template, and if so it would also be nice - but not essential - if you could still set a default from that list. Link to comment Share on other sites More sharing options...
ryan Posted August 17, 2011 Share Posted August 17, 2011 Pete, we must be on the same wavelength because I actually added this feature to the P21 source yesterday. See the latest commit. In addition, you can also specify multiple 'required parent templates' should you want to. For instance, if you only wanted it to be possible to add news-item pages below a news-archive page. Link to comment Share on other sites More sharing options...
Pete Posted August 17, 2011 Author Share Posted August 17, 2011 And this is why I love ProcessWire Cool stuff! Link to comment Share on other sites More sharing options...
Pete Posted August 20, 2011 Author Share Posted August 20, 2011 Just a quick one here - I think when you then go to add a child page, the template list should reflect the order you have them in when specifying possible templates. I've got a slight issue where there are 3 possible child templates, gallery_home, gallery and page, and page would be the most commonly used child template, yet the list is in alphabetical order no matter what order I drag those fields into when specifying the choice of templates. I guess in many situations it would make sense to have it alphabetical if you're specifying a lot of child templates, so perhaps have a checkbox when specifying child templates to allow the admin to specify that the list should appear alphabetically instead of the order they are in the list, or vice-versa if you think alphabetical ordering should be the default? Link to comment Share on other sites More sharing options...
ryan Posted August 21, 2011 Share Posted August 21, 2011 I think that makes sense. If they've specified certain child templates as allowed in the template settings, then I think it should follow what ever order they've specified. Whereas alpha order makes sense if they haven't specified anything. But since the order is sortable in that part of the template editor, we might as well retain it. I've added this to the GitHub issues list. Thanks, Ryan 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