Making multiple default panel presets for the same content type

Events happening in the community are now at Drupal community events on www.drupal.org.
tommeir's picture

Hi all,

We are just starting a big project based on panopoly and there is an interesting issue I am struggeling with that I think we can all benefit from thinking about in order to make this awsome distro even more awsome.

Our client wants to have the ability to choose a panel preset that will define both layout and default panes when creating content pages. It is possible to have such default settings per content type, but in this case multiple presets needs to be developed so that the user can choose which one he wants to use for each specific content and switch between them.

I dont see a need to create a content type for each preset as the data structure of the content is the same no matter what preset is chosen. instead, I would like to enable the user to change preset and have the layout and panes rearrange themselves automatically based on his/hers decision.

What would you guys consider a good practice to achieve this?

Again the expected scenario is:
1.User opens the node add form and fill in content
2.User chooses a preset for displaying that content in a certain way
(i.e. one preset could have 2 sidebars with ad blocks and comments, and another could have no sidebars and a pane of related content below)
3. The page is shown with the content & layout chosen by the user
4. User can edit the content again and pick another preset, or edit the default one just for this content.

All of the solutions I can think of seems a bit 'hackish', like connecting a taxonomy term with different context variations of the content page panel preset.

Penny for your thoughts?

Comments

Panelizer?

Ddroid_za's picture

Isn't that what panelizer helps with?

I know you can define "templates" for each content type in /admin/config/content/panelizer. Maybe not correct approach for you, but consider using the "Allow panel choice" list option on your full page/default over rides for that content type. Define your layouts, content panes etc in there... can clone, give each an default layout etc... Gives you a nice option to pick an template when editing/adding a node of that content type. With a bit of custom code I'm sure you can make the node always revert back to the option selected in the node edit form instead of the default, giving you a nice revert if the user messes up or want to "start over" with the page. We have also used display suite to provide and manage extra displays... Hope that helps?

As Ddroid_za says, this is

damienmckenna's picture

As Ddroid_za says, this is exactly what Panelizer is for.

Awsome, I wasnt aware of that

tommeir's picture

Awsome, I wasnt aware of that option... seems like just what i was looking for :)
a bit of code to weld it all together and I can already see the client smiling.

Thanks for the quick reply Ddriod_za.

Panopoly

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: