maybe there is a way to do this that I'm not seeing, but I think it would be very useful to tell a parent what filter/layout/page type his children should be. As an example of this, I have a primary layout that is used for the Home Page and most pages inherit from that. Under the Articles (page type archive), the children should have a post layout instead of the primary one. Currently I have to set the page layout for each post. I'd like for a new child of the archive to know which layout it should use. Does this make sense or are there limitations in radiant that would keep this from being fulfilled? dm
on 2007-02-21 15:31
on 2007-02-21 16:15
On Feb 21, 2007, at 9:30 AM, David Minor wrote: > maybe there is a way to do this that I'm not seeing, but I think it > would be very useful to tell a parent what filter/layout/page type > his children should be. As an example of this, I have a primary > layout that is used for the Home Page and most pages inherit from > that. Under the Articles (page type archive), the children should > have a post layout instead of the primary one. Currently I have to > set the page layout for each post. I'd like for a new child of the > archive to know which layout it should use. I'm having the same problem and have resorted to using One Layout to Rule Them All -- merged my two or three layouts into one big layout using if_url/unless_url -- works fine and duplication really isn't an issue using snippets. Not the best, but darn good; some other ideas I've had: - I think it would be possible to have an extension create a "Children's Default Layout:" dropdown - Another related solution is a "shortcuts" extension I'm working on, which adds "New Blog Post"-like links for user-defined commonly created page types. Each creates a new page w/ some options pre- defined and possibly immutable, e.g. parent page, filter, default parts, default page type, automatically created child pages love to hear others' thoughts -jamie
on 2007-02-21 17:01
Jamie, I'm trying to solve the same problem with a different solution. I've created what a "TemplatePage" type, and all page parts have a checkbox for "is_template". You can then have quicklinks like you described "New Blog Post" that would create a new "ContentFromTemplatePage" using the "Blog Post" template page as it's base. Only parts that are marked with "is_template" will exist in the newly created page. If a part is referenced in the context of a ContentFromTemplatePage and it doesn't exist on that page, then the TemplatePage is was created from will provide this part. That way you can use the "body" part in your TemplatePage "Blog Post" to define the layout of the post. And then have is_template parts "teaser" and "extended" that contain just straight text content. new "Blog Post" items will be created with a "teaser" and "extended" part (and no body). And when the layout refers to <r:content part="body"/> it will pull the formated body part from the TemplatePage it was created from, and when that body refers to "teaser" and "extended" parts it will show the content you entered for your particular blog post? Make sense? This and a number of other things, like TinyMCE, FCKEditor, and pages attributes (which inherit in the same way that parts do from TemplatePage). Will be part of an upcoming extension currently being called the PageAttributes extension. There's only 1 catch. I'm relying on changes I made to the facets branch which havn't been accepted by the core devs yet.