Exemplo n.º 1
0
defined('_JEXEC') or die('Restricted access');
global $mainframe;
// count instances
if (!isset($GLOBALS['yoo_accordions'])) {
    $GLOBALS['yoo_accordions'] = 1;
} else {
    $GLOBALS['yoo_accordions']++;
}
// include the syndicate functions only once
require_once dirname(__FILE__) . DS . 'helper.php';
// disable edit ability icon
$access = new stdClass();
$access->canEdit = 0;
$access->canEditOwn = 0;
$access->canPublish = 0;
$list = modYOOaccordionHelper::getList($params, $access);
// check if any results returned
$items = count($list);
if (!$items) {
    return;
}
// init vars
$style = $params->get('style', 'default');
$layout = $params->get('layout', 'vertical');
$open = $params->get('open', 'first');
$multiple_open = $params->get('multiple_open', 0) ? 'true' : 'false';
$module_base = JURI::base() . 'modules/mod_yoo_accordion/';
// css parameters
$accordion_id = 'yoo-accordion-' . $GLOBALS['yoo_accordions'];
// js parameters
$javascript = "new YOOaccordion(\$\$('#{$accordion_id} .toggler'), \$\$('#{$accordion_id} .content'), { open: '{$open}', allowMultipleOpen: {$multiple_open} });";
Exemplo n.º 2
0
        $item_class .= " last";
    }
    ?>
			<dt class="toggler <?php 
    echo $item_class;
    ?>
">
				<span class="header-l">
					<span class="header-r">
						<?php 
    echo $listitem->title;
    ?>
					</span>
				</span>
			</dt>
			<dd class="content <?php 
    echo $item_class;
    ?>
">
				<?php 
    modYOOaccordionHelper::renderItem($listitem, $params, $access);
    ?>
			</dd>
				
		<?php 
}
?>
		</dl>

	</div>
</div>