You are here

function faqpanels_faqpage_content_type_render in Panels Extras 7

Same name and namespace in other branches
  1. 6 faqpanels/plugins/content_types/faqpage.inc \faqpanels_faqpage_content_type_render()

Render the custom content type.

1 string reference to 'faqpanels_faqpage_content_type_render'
faqpage.inc in faqpanels/plugins/content_types/faqpage.inc

File

faqpanels/plugins/content_types/faqpage.inc, line 30

Code

function faqpanels_faqpage_content_type_render($subtype, $conf, $panel_args, $context) {
  $tid = 0;
  $faq_display = '';
  if (@(!empty($panel_args['tid']))) {
    $tid = $panel_args['tid'];
  }
  if (@(!empty($panel_args['faq_display']))) {
    $faq_display = $panel_args['faq_display'];
  }

  // Build the content type block.
  $block = new stdClass();
  $block->module = 'form';
  $block->delta = $tid;
  $block->content = faq_page($tid, $faq_display);
  return $block;
}