MCNi Wiki : Manually Calling Bombplates Widgets

In order to render a system widget, you need to invoke hook_html_panel_make_widgets


That means, you figure out which module creates the widget you want (e.g. mailing_list) and replace the word "hook" with the module name. The function takes one argument: $delta. It is always 0 unless the module generates multiple widgets*


This will give you a nested array containing your widget. You will need to access [hook][$delta]['body'] to get the contents of the widget


So if hook is mailing list:

<?php

  $widgets = mailing_list_html_panel_make_widgets(0);

  print $widgets['mailing_list'][0]['body'];

?>


The options for hook are currently:

  • catalog
  • discography
  • member_display
  • merch_display
  • tour_display
  • blog_display
  • news_display
  • media_display
  • audio_display
  • fan_club
  • file_host
  • mailing_list
  • twitter


* media_display is the only one that has multiple widgets right now. Passing in 0 will return the photo widget. 1 will return the video widget.