* @link https://www.tassos.gr * @copyright Copyright © 2024 Tassos All Rights Reserved * @license GNU GPLv3 or later */ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Factory; extract($displayData); if (!$value || !is_array($value) || !count($value)) { return; } if (!$readonly && !$disabled) { foreach (\NRFramework\Widgets\FAQ::getJS() as $path) { HTMLHelper::script($path, ['relative' => true, 'version' => 'auto']); } } if ($load_stylesheet) { foreach (\NRFramework\Widgets\FAQ::getCSS() as $path) { HTMLHelper::stylesheet($path, ['relative' => true, 'version' => 'auto']); } } if ($load_css_vars && !empty($custom_css)) { Factory::getDocument()->addStyleDeclaration($custom_css); } $open_icon = $close_icon = ''; if ($show_toggle_icon) { switch ($icon) { case 'arrow': $open_icon = ''; $open_icon = ''; break; case 'circle_arrow': $open_icon = ''; break; case 'plus_minus': $open_icon = ''; $close_icon = ''; break; case 'circle_plus_minus': $open_icon = ''; $close_icon = ''; break; } } $total_items = count($value); $items_per_column = $columns ? ceil($total_items / $columns) : $total_items; $item_index = 0; ?>
1) { ?>
= $total_items) { continue; } $faq_item = $value[$item_index]; $item_atts = ''; $answer_atts = 'style="height: 0px;"'; if (($initial_state === 'first-open' && $item_index === 0) || $initial_state === 'all-open') { $item_atts = 'data-open="true"'; $answer_atts = ''; } ?>
>
' . $open_icon . $close_icon . '
' : ''; ?>
' . $open_icon . $close_icon . '
' : ''; ?>
>

1) { ?>