Panels everywhere

2,790
-1

Published on

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,790
On Slideshare
0
From Embeds
0
Number of Embeds
33
Actions
Shares
0
Downloads
20
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Panels everywhere

  1. 1. Panels everywhere as a concept Sergiu Savva Drupal developer
  2. 2. Introduction When should we use panels ? Always !
  3. 3. Panels Why ? Panels = Flexibility
  4. 4. Panels
  5. 5. Panels
  6. 6. Panels User interface
  7. 7. Panels User interface
  8. 8. Mini panels
  9. 9. Mini panels * http://codekarate.com/content/embed-mini-panel-code
  10. 10. Mini panels function example_page_callback ($js = NULL, $node = NULL) { // Fall back if $js is not set. if (!$js) { drupal_goto( 'node/' . $node->nid); } ctools_include( 'modal'); ctools_include( 'ajax'); ctools_include( 'context' ); $context = ctools_context_create( 'node', $node); $context ->identifier = t('This node' ); $context ->keyword = 'node'; $contexts = array('panel-node' => $context ); $html = example_panel_mini_render( $node, 'MY_MINI_PANEL' , $contexts ); $output[] = ctools_modal_command_display( 'Content' , $html); print ajax_render( $output); exit; }
  11. 11. Mini panels function example_panel_mini_render ($data, $panel_name , $contexts ) { if (isset($data)) { // Add a node context to the mini panel. ctools_include( 'context' ); $panel_mini = panels_mini_load( $panel_name ); $context = ctools_context_match_required_contexts( $panel_mini ->requiredcontexts , $contexts ); $panel_mini ->context = $panel_mini ->display->context = ctools_context_load_contexts( $panel_mini , FALSE, $context ); return panels_render_display( $panel_mini ->display); } return ''; }
  12. 12. Mini panels } node fields custom pane } } Views Views
  13. 13. Page manager
  14. 14. Page manager
  15. 15. Panels everywhere
  16. 16. Panels everywhere Demo
  17. 17. Panels everywhere Thank you
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×