Question

I am building my own panels, but would really like to be able to customize them using some kind of customization settings. One case would be a three column layout - my goal then would be to have one panel for both the 40/40/20% layout and the 20/20/60% layout using some kind of input arguments. Optimally i would like to use a generic column layout so i could use it with both "40/40/20" input arguments as well as "10/10/50/20/10".

Would any of this be possible?

Edit: To clarify, I would like to (in the panelname.tpl.php file) be able to write something like

<div id="myLeftPane" class="first-column" width="{myCustomWidthSettingVariable}"> ... </div>

and to be able to set the variable to different things in the different places where I use the panel.

Thanks! /Victor

Was it helpful?

Solution

You can make all the layouts you want where you define the regions and the css needed to style the them.

For a panel page that take an argument, you can use that you decide which layout should be used, what content should be printed and where it should be printed.

An example of this, would be to create different layouts for each node type, but you could do it with anything really.

Some of this can be done out of the box, while some of it might require you to code your own plugins. To go into detail with all the possibilities and how to do it would be too extensive to write here.

Good sources to learn more is the Panels documentation or look at other modules integration with panels and see how they done things.

Update:
What you are trying to do is not how panels was built. I'm not saying it's impossible, but I imagine that it will be quite hard. You should be able to get very far with CSS and HTML, where that isn't enough it will be easier to create additional layouts with different CSS/HTML.

Remember that panels will create a lot of classes, so you might be able to handle this with custom CSS in your theme.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top