Rendering a single panels pane/region for AJAX callback

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

(Using Panels 6.x-3.3)

I'm working on putting an "edit" link next to each region/pane on my panels page. I have something mostly working that creates a modal dialog with a form to update the content, and then render the content back on to the page.

My problem is that I'm using the CCK/Content API to render the new HTML, and it is not consistent with how panels renders the content. For example, panels puts the field label in a "pane-title" div. I replace the "pane-content" div with my newly rendered html. That then produces two labels (with different styling). I can imagine lots of ways that the resulting content will not match the original layout.

I'm hoping there is a panels API function that will allow me to render a single pane (region) of a given panel. An AJAX callback could then render a specific pane efficiently. panels_render_pane_content() seems to be the correct entry point here, but it's not clear the correct way to build the parameters ($display, $pane, $keywords).

Ideally, I'd want to be able to extract the necessary information from the page markup to identify the pane. Then pass that information to a panels API function (via an AJAX call), which would then return a rendered pane (with updated content).

What is the "correct" way to go about this, or is there one?

Comments

@tnichols, did you ever get

brianmercer's picture

@tnichols, did you ever get this figured out?

Hi. Did you manage to find a

Zweb's picture

Hi. Did you manage to find a method?

Subscribing

rangi500's picture

Subscribing

Panels

Group organizers

Group notifications

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