Current panels 2 status and needs

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

Updated: Dec 11, 2007

Additionally, the following items are currently in progress:

  • panels_mini.module -- this module will create panels that will be exposed as blocks. I.e, the panel within a panel. A good use is to put a bunch of content in a one column panel, and then put that throughout the site.
  • panels_profile.module -- A panel that will let every user have their own display to edit their profile page. This is an outward facing page, and lets users have significant amounts of control over their "my account" page. This is sort of the starting place for a myspace type site.
  • panels_node_decorator.module (what a lousy name) -- lets you control node pages with panels. Should offer fine control so that nodes with different types or different taxonomy will get different displays. -- this is no longer necessary as panels pages came up with a clever way to do this for free.
  • panels template -- will allow your theme to use panel layouts instead of page.tpl.php, and use the panels layout engine to lay out your entire site.
  • new CCK integration -- integrate panels with CCK. At the very least, the 'node reference' and 'user reference' relationship, all by itself, would add immense power to Panels.
  • new Documentation. There are two forms: User documentation; there is an outline for that on a wiki page in this group. Please help. The second form is API documentation.

For some of these, there isn't a lot of design yet, just some ideas. This is the place to come to discuss the features these should have, and additional modules that can utilize Panels.

Comments

Node decorator

mfredrickson's picture

Name issues aside, can you provide any more detail on the status of these? I've been looking at CCK's "display fields" tab as a great interface to theming content types by placing fields into different regions of a panel.

This might also be a good way to solve viewfield's long running problem of having 1000 nodes, all with the same view and arguments because you want node type X to always display a list of related nodes (eg. tracks on album nodes). Instead of using a viewfield, just drop in a view directly to the panel, in addition to the per-node fields.

Wim Leers has agreed to work

merlinofchaos's picture

Wim Leers has agreed to work on panels_mini.module

Right now there are no definite volunteers for any of the other modules, but I've gotten Sam Tresler's interest in the panels_profile module.

The node decorator module is currently a concept that needs to be written. I'll do it eventually if no one volunteers, but there's no reason I have to write it. I'll happily include said module in the Panels package, as I think it's important.

Awesome!

robloach's picture

Panels 2 sounds pretty amazing! Keep up the great work... Can't wait.

panels_profile.module -- A

agentrickard's picture

panels_profile.module -- A panel that will let every user have their own display to edit their profile page. This is an outward facing page, and lets users have significant amounts of control over their "my account" page. This is sort of the starting place for a myspace type site.

Perhaps its time to start the MySite/Panels integration discussion again, because this functionality already exists.

--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3

Bringing it all together

gusaus's picture

This will be a great combo. I've been a huge fan of both these modules and look forward to testing and helping out.

Gus Austin
PepperAlley Productions

Gus Austin

Plus 1 on integration or collaboration

mlncn's picture

between MySite and Panels...

~ ben melançon

member, Agaric Design Collective
http://AgaricDesign.com - "Open Source Web Development"

benjamin, agaric

I am completely in favor of

merlinofchaos's picture

I am completely in favor of this. =)

Yes

agentrickard's picture

Me too. Earl and I even discussed this at DrupalCON Sunnyvale, but I couldn't make it happen.

I must admit that the JavaScript work you have been doing is also over my head, so I pushed forward with features I knew I could get out the door. I would consider MySite "done" now, as it has a good feature set, so now we can start to look at expanding what the module does.

The last time I looked (granted, that was in March), the Panels 2 API was under construction and I couldn't really follow it based on the code. I look forward to seeing the API.

MySite's API is here: http://therickards.com/api/groups

Based on the work I did for Views integration, I would estimate that adding support for exposing Panels to MySite would take less than a day. It would also be very easy to let users define content elements (free-form or guided text-entry with limited HTML, similar to the Droplet code we have now) to add to their pages.

The real hard question is: do we try to merge the UI and Layout systems. How tightly coupled should the modules be? It might be easiest to write some bridge API code (expose Droplets and other content to Panels; expose Custom Panels to MySite).

Other random thoughts:

  • Demo page: http://therickards.com/mysite/default
  • I never tried to replace the normal user page, but that is probably easy if you know the menu system better than I do.
  • See the development roadmap: http://groups.drupal.org/node/4945. Adding personal pages, OG support, and access controls are the big items on the list.
  • I will be in Barcelona, BTW, but am hoping to let MySite sit for a while until then (see http://groups.drupal.org/node/4983).
  • I'd really like to see some seasoned developers like Benjamin and Earl take a look under the hood.
  • Now is a good time for MySite feature requests (including "integrate tightly or loosely with Panels").
  • I've already committed to porting MySite to D6, so that may be the chance to work on both together.

--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3

Form/UI reuse

mfredrickson's picture

I think a common need for integrating panels into other modules is access to the panel UI. If could call a function to get the panel form, and register some other items to put in the list of available items to assign to a region, I think we could quickly integrate panels with profile, CCK, etc.

Having not looked at the code, is such a facility supported, or are panel "items" global -- ie. they must be valid for page panels too?

-Mark

I answer this with code.

merlinofchaos's picture

I answer this with code. Here is the relevant portion of panels_node.module:

<?php
// ---------------------------------------------------------------------------
// Meat of the Panels API; almost completely passing through to panels.module

/<strong>
*
Pass through to the panels layout editor.
*/
function
panels_node_edit_layout($node) {
 
$display = panels_load_display($node->panels_node['did']);
  return
panels_edit_layout($display, t('Save'), "node/$node->nid/panel_layout");
}

/</
strong>
*
Pass through to the panels layout settings editor.
*/
function
panels_node_edit_layout_settings($node) {
 
$display = panels_load_display($node->panels_node['did']);
  return
panels_edit_layout_settings($display, t('Save'), "node/$node->nid/panel_settings");
}

/**
* Pass through to the panels content editor.
*/
function panels_node_edit_content($node) {
 
$display = panels_load_display($node->panels_node['did']);
  require_once
drupal_get_path('module', 'panels') . '/panels_common.inc';
 
$content_types = panels_common_get_allowed_types('panels_node');

 
// Print this with theme('page') so that blocks are disabled while editing a display.
  // This is important because negative margins in common block layouts (i.e, Garland)
  // messes up the drag & drop.
 
print theme('page', panels_edit($display, "node/$node->nid/panel_content", $content_types), FALSE);
}
?>

I will add: The concept of a

merlinofchaos's picture

I will add: The concept of a panels Display is completely independent from the concept of the page. THus, one of the forthcoming modules to utilize this API is the panels_mini.module, which creates a panel that is exposed as a block/panel content. It's never rendered as an independent page.

The display also can accept incoming content, though currently no content type supports using this content (but only because I just haven't gotten there.) The idea of that being that it shouldn't be too hard to use a display as a wrapper around other content, and that other content is just a pane within the display.

The display also understands the concept of a 'context', and some content can restrict itself from being available unless that content is active. This still needs refinement and I'd love some help getting this right (technically) but the short version here is that if you set the context to 'node', and provide a node object, then panels content can say "Hey, I need a node, you can use me" and then when that content is rendered, it is passed that node as part of the context.

The one thing that's tough here is how to deal with multiple context and items that can fall into multiple context. For example, an 'og' node should probably active all of 'og', 'node' and 'user' context (since nodes have authors, that's the user). But should there also be an 'author' context or is just 'user' sufficient?

taxonomy

slantview's picture

Does panels2 have the ability to assign taxonomy to a panel? This would be a great feature as I have had to write around this in the worst possible ways. (hint: taxonomy synonyms and urls)

steve

could you elaborate

mlncn's picture

As someone quite interested in taxonomy getting its due, I'd like to know more about what you needed and what you did.

The short answer is yes, because through the wizardry of MerlinOfChaos Panels 2 allows a panel to be a node, so you can assign taxonomy terms (and comments and votes and...) to it.

~ ben melançon

member, Agaric Design Collective
http://AgaricDesign.com - "Open Source Web Development"

benjamin, agaric

The other way round

olav's picture

Steve, I've just uploaded a module that works the other way round: Associate a panel page with a taxonomy term. Maybe you can benefit from this?

The mini-panel is awesome!

amitaibu's picture

The mini-panel is awesome! Thanks WIM!

panels_node_decorator.module

amitaibu's picture

panels_node_decorator.module is indeed not a sexy name, but I'm really eager to see it working...

This comment exists to

merlinofchaos's picture

This comment exists to inform all subscribers that the post was updated. =)

Merlin, Can you elaborate on

amitaibu's picture

Merlin,
Can you elaborate on how's does the new panel pages give the node_decorator functionality?

node/%

merlinofchaos's picture

By using the node/% URL and a node id argument, you get pretty much the same functionality I had intended with the node decorator ideal.

can it/ will it reach a

amitaibu's picture

can it/ will it reach a point where Panels can allow changing the layout of a content type? For example - for all story nodes , have a 2 stack layout , place the title on the left, body and CCK fields on right, etc'.

(currently this is my work-around for this)

It can do this now, but

merlinofchaos's picture

It can do this now, but there are some not-yet-documented tricks to doing so. By way of the brief explanation:

Using 'node/%' as the URL, in the node ID argument, set 'Story' type to have its own display. This will add new subtabs under the Layout, Layout settings and Content tabs; each one will now be able to have its own layout and content.

The trick, then, is that when you use the Node Context: node content type, you can use the 'panel identifier' to use different templates. That makes it possible to create templates for each pane and have your CCK fields wherever you want them.

You'll put some code that looks like this in your _phptemplate_variables():

<?php
// ... under case 'node' somewhere, assuming $node = $vars['node']
 
if (!empty($node->panel_identifier)) {
   
$vars['template_files'][] = 'node-panel-' . $node->panel_identifier;
  }
?>

In the node content pane config, you'll notice a panel identifier line. Enter whatever you like there. If you entered 'foobar' into that box, and put the above code into your template.php (adjusting to match appropriately) then you will use the template 'node-panel-foobar.tpl.php' for that pane. You can strip things down and put only the fields you like as output there.

It would be nice to print

moshe weitzman's picture

It would be nice to print individual CCK fields without resorting to themeing. I am thinking that we can do this in D6 by creating custom $node->build_mode styles and then we can use the CCK Display fields tab to construct the exact presentation thats needed for a given content item.

CCK group

michelle's picture

If you use the dev version of CCK that has my patch, you can put individual CCK field groups into panes. It's not quite on the level of individual fields, but does give you some customizing without theming.

Michelle


See my Drupal articles and tutorials or come check out the Coulee Region

put individual CCK field groups into panes,,,

rhimes's picture

is exactly the problem I'm having, as described in http://drupal.org/node/241826, which I started in AdvProfile queue - should it be in CCK, cck_map, Panels (2)?

As I am unable to successfully get my "My Map" (cck "field group", with a population of one cck_map field) to display in "My Map" pane.

panels template -- will

sime's picture

panels template -- will allow your theme to use panel layouts instead of page.tpl.php, and use the panels layout engine to lay out your entire site.

I'm interested in this one, but have had no achieving it myself.

node reference

chromix-gdo's picture

I needed a node reference relationship so I created one. The resulting code is posted in Panels. If anyone wants to review it (I'm a designer, not a developer) feel free.

http://drupal.org/node/245571

can i Pass

skctek's picture

Hi

can i pass the search result nodes to the view in such a way that view will access each node ande retrieve all the terms for each node and display these term.

Thank you in advance.

Panels

Group organizers

Group notifications

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