开发者

Settings in custom Drupal Panel

开发者 https://www.devze.com 2023-02-01 05:45 出处:网络
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 p

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号