Associating Arbitrary Page Types with Template Files

Permalink
The core allows a builder/editor to arbitrarily create new page types and then assign defaults to those page types, but currently the utility of this is limited, since a theme doesn't know what to do with the new page type and just renders it with default.php. It is obvious why *templates* should be able to create new page types, but I submit that users with appropriate permissions to add new page types themselves should *also* be giving the ability to associate page types with a given template file for any installed theme.

Use case:
In this magical world I am imagining, I am a company executive in marketing and I have two different themes in use on my site: Trendy Corporate Theme and Hip Charity Theme. I make a new page type called "Press Release" because I want to be able to configure page lists, advanced permissions, etc. specially for all my press releases. In the *real* world I am stuck with both my themes rendering all pages of this new page type using default.php (unless I modify the themes myself, which I don't want / know how to do since I don't even know what PHP means). But, in my *imaginary* world I can associate this new [foreign] page type with specific template files in each of my themes. So, for my Trendy Corporate Theme I associate the new Press Release page type with the left_sidebar.php file, since in the corporate areas of my site our press releases should have a sidebar. Then, for my Hip Charity Theme I associate the new Press Release page type with the home_page.php file, since our charity branch of my business wants to surround their press releases with all the jazzy charity promo stuff that is included in that template file.

I'm putting this in the chit-chat forum, although it might also work in the beta discussion forum. What are the chances of something like this getting integrated into the core? Does this seem like a viable request; could it use any refinement?

A similar thread that has gone unanswered:http://www.concrete5.org/community/forums/usage/feature-request-vir...

queesamor
 
frz replied on at Permalink Best Answer Reply
frz
I get what you're saying.
I think this will be resolved with the new composer types we've been
working on.
http://www.youtube.com/watch?v=4v9ieV7a1hs&list=UUywmkk3TWHLcYy...

thoughts?


best wishes

Franz Maruna
CEO - concrete5.org
http://about.me/frz
queesamor replied on at Permalink Reply
queesamor
You know, the new composer types might just do it. After re-watching that preview I am left with several questions (which is fine, since it was just a preview), but here are the two most relevant to this discussion:
1. Will the new Composer Types be elevated to the same kind of first-class status Page Types have in 5.6? Page Types are available for special permissions, filtering/querying, and more all throughout the Concrete5 system, and in order for composer types to fill the role we're looking for, they would need to be available in all the same places with just as much authority (not the best word, but all I've got at the moment).
2. Will it be possible in the Edit Form or Output sections of a Composer Type's config area to customize each block to the degree that each block can be customized already in the Defaults section of Page Types (all the possible design customizations and any other settings)?

The changes to Composer really do look exciting, even if they don't solve this particular need. Do you have any unstable build of 5.7 that we might be able to mess around with a bit to see if these might work in place of giving admins the ability to associate page types with template files? I noticed that the 5.7.0 branch in git hasn't been committed to in two months... :)

Anyway, thank you for how responsive you are! Thoughts about these questions or the general request?
frz replied on at Permalink Reply
frz
1) Yes, to a degree. Yes you will be able to control who has access to which composer types No you won't be able to limit page list block by what composer type made it. You might be able to do that with attributes in the future however.

2) Yes. Just like composer today, but more so. You could make specific composer templates for blocks so yeah a simpler (or not) version of the block edit mode for specific composer case.


No 5.7 is private at the moment because its very much in flux. We have that habit of going dark when we're still figuring things out as there's only so much time in the day and explaining why we're not going to do something we tried to do and didn't like is exhausting. That being said, should be something available in the coming weeks.
queesamor replied on at Permalink Reply
queesamor
Alright fantastic. I understand going dark; it's probably a great tactic to take :)

Thanks for the info; I'm excited for what is to come!