One good thing in 0.9.2 is that child docs inherit parent’s template by default. But, I found while creating two last sites that I definetely would be happy to have a template specified for all children by default.
For example. I have a news section where children are news items itself. The page where I call those news items linked to a general site template (with no TVs). My news items are linked to a ’news’ template which has a number ov TVs. In 0.9.2 I’ll have the general template for each news item by default because the parent (with news call) has this general template.
I know there’s a way to achieve what I want through creating a parent somewhere with ’news’ template and call news from there. But isn’t it too complicated?
So, what I claim is: a ’child default template’ option for a parent document would be much appreciated.
Well, I’d tell this is a major difficulty for my customers to specify a template every time he/she creates a news item or else. By the way, what was the point of making a feature of child docs inherit parents template? If a parent is a category folder with ’(blank)’ template what then?
Can there be any advantage of this ’child doc inherit template’ feature at all? Or am I stupido?
thanks
-
MODX Staff
- 12,272 Posts
That’s a good corner case discover yentsun... In that case the inherit parent wouldn’t be too helpful...
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
thank you Ryan... wish I could do this myself
-
☆ A M B ☆
- 24,524 Posts
@yentsun: I have solved this temporarily by training my users to "duplicate" an existing news item document and edit it, instead of creating a new document. That way it will have all of the settings of the original news item document, including its template.
This same "corner condition" exists with the @INHERIT TV binding as well. Very useful, except in the instance where your container document needs one setting, and all its children need another. Again, nested folders will work, but add clutter and complexity to such a lovely, simple structure system.
Quote from: sottwell at May 31, 2006, 02:03 AM
@yentsun: I have solved this temporarily by training my users to "duplicate" an existing news item document and edit it, instead of creating a new document. That way it will have all of the settings of the original news item document, including its template.
Aww! I somehow forgot about that! Thank you fair lady
-
☆ A M B ☆
- 24,524 Posts
The existing Inherit Template plugin works just fine. If you want your (for example) news items to have a different template than the main "News" page, just put them in a different, unpublished container that uses the template you want your individual items to have. Then set this container’s ID as the &parents value of the Ditto parameter.