Just like you can specify a style, how about allowing the user to specify the element of panes and regions? Thoughts?

Comments

dddbbb’s picture

Mmmm. Yes, please.

bensnyder’s picture

Glad you like the idea! This feature would dovetail very nicely in the theme just released: Panels 960gs. Dixhuit, be sure to check it out!

Merlin, sorry if all the posting on 960gs is spammy to you - I must be in at least a dozen of your threads!

merlinofchaos’s picture

The style controls the element, and styles can have forms. In order to achieve this, you'd need to create a style that does it.

Perhaps we could attempt to modify the default style to do this, I'm not sure. It'd be best if it starts out as a separate style and if it turns out to be really great, gets integrated back in.

bensnyder’s picture

Assigned: Unassigned » bensnyder

The style controls the element, and styles can have forms. In order to achieve this, you'd need to create a style that does it.

Perhaps we could attempt to modify the default style to do this, I'm not sure. It'd be best if it starts out as a separate style and if it turns out to be really great, gets integrated back in.

I'm on it! Consider it done. I need this functionality for 960gs so I'm going to mod the default styles (...in hopes to integrate into Panels itself later on).

Merlin, quick question RE overriding the plugins.

I used to use function panels_960gs_960_16_484_panels_layouts() but now I'm using:

<?php
$plugin = array(
  'title' => t('960/16 4-8-4'),
  'category' => t('960gs: 16'),
  'icon' => 'icon.png',
  'css' => '../../../../lib/grid.css',
  'theme' => '960_16_484',
  'regions' => array(
    'top' => t('Top'),
    'aboveLeft' => t('Above Left'),
    'aboveCenter' => t('Above Center'),
    'aboveRight' => t('Above Right'),
    'middle' => t('Middle'),
    'belowLeft' => t('Below Left'),
    'belowCenter' => t('Below Center'),
    'belowRight' => t('Below Right'),
    'bottom' => t('Bottom')
  ),
);
?>

...to define Panel layouts. Is the hook deprecated? Or is that would I would use to override a layout defined by $plugin? How would I go about overriding the definition itself?

And ultimately, how exactly would this apply to styles?

merlinofchaos’s picture

The hook is deprecated but it won't actually be going away -- there are legitimate reasons why you might still actually need to use the hook. (They mostly have to do with ways that your plugin file might get included before the plugin itself is ever referenced).

I'm not quite sure how we got from changing styles to overriding layouts, though. At the moment I don't think I offer a way to override layouts.

bensnyder’s picture

The hook is deprecated but it won't actually be going away -- there are legitimate reasons why you might still actually need to use the hook.

Ok, thanks!

I'm not quite sure how we got from changing styles to overriding layouts, though.

I've got my Panels training wheels on and I'm just about to lose them... I was assuming the $plugin definition for layouts would be similar to styles so I phrased the question that way. Bear with me :) thanks. I checked the Advanced Help area for /help/panels/plugins-style and it seems incomplete? No worries.. just know that I'm trying to do all my research and self-help before imploring your time.

EDIT: Moved part of this comments to #1040422: Layout Migration (migrate one panel layout to another layout on theme upgrade)

bensnyder’s picture

StatusFileSize
new3.7 KB

Proof-of-concept patch attached; its against alpha2 and is relative to the panels module directory. Should I be working against HEAD?

It was easier to copy the code used for "CSS properties" but I imagine it would be best if this was done the way "Style" is done with a sub menu.

With "div" set to default and various options (like aside, section, etc...), we could easily do the following in pane output:

<<?php print $tag; ?>>
.........
.........
.........
</<?php print $tag; ?>>

Thoughts?

merlinofchaos’s picture

Interesting. That would require every style to be able to understand the tags, though. Which is interesting because some styles (naked, fore example) don't use the tags at all.

Since styles can have their own forms, I should think that the place to start would be to try and add a settings form (I think it's 'pane settings form') to the default style.

Anonymous’s picture

Hey, I'm interested in helping to implement a solution for this feature request. Copying the "CSS properties" functionality is a start, even if the patch in #7 does not really solve it.

I'm not sure if a style plugin solution would/could work with other style plugins? For example I use the precision theme with the grid style plugin. If I use the grid plugin then I can't use another style plugin for the html markup, except I would implement that into the grid plugin as well. So even we come up with multiple styles per pane/region or we extract the bare essentials like tag (attributes) and css (id, classes, style) one level up like the CSS properties does!?

So if anyone has ideas, or more information about the proper architecture for this I'm listening (reading). :)

bensnyder’s picture

Assigned: bensnyder » Unassigned
gmclelland’s picture

japerry’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 7 is no longer supported, closing.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.