Featured in evidenza swiper slider
This commit is contained in:
@ -0,0 +1,140 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/** @var \Joomla\Component\Content\Site\View\Featured\HtmlView $this */
|
||||
|
||||
|
||||
|
||||
use Joomla\CMS\Helper\ModuleHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
$ncol = (int) $this->params->get('num_columns');
|
||||
|
||||
|
||||
|
||||
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
|
||||
|
||||
$wa->useStyle('swiper.css.styles', ['position' => 'before']);
|
||||
$wa->useScript('swiper.js.scripts');
|
||||
|
||||
|
||||
$wa->addInlineScript('
|
||||
window.addEventListener("DOMContentLoaded", function(){
|
||||
|
||||
var swiper = new Swiper(".carosellofeatured", {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 10,
|
||||
loop: true,
|
||||
navigation: {
|
||||
nextEl: ".swiper-button-next",
|
||||
prevEl: ".swiper-button-prev",
|
||||
},
|
||||
breakpoints: {
|
||||
|
||||
480: {
|
||||
spaceBetween: 10,
|
||||
slidesPerView: 2,
|
||||
},
|
||||
|
||||
768: {
|
||||
spaceBetween: 10,
|
||||
slidesPerView: 3,
|
||||
},
|
||||
|
||||
1200: {
|
||||
spaceBetween: 20,
|
||||
slidesPerView: 4,
|
||||
},
|
||||
|
||||
1524: {
|
||||
spaceBetween: 40,
|
||||
slidesPerView: '.$ncol.',
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
', [], ['type' => 'text/javascript']);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="featured">
|
||||
<?php if ($this->params->get('show_page_heading') != 0) : ?>
|
||||
<div class="titolo-featured">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="container-jit">
|
||||
<?php if (!empty($this->lead_items)) : ?>
|
||||
<div class="blog-items items-leading <?php echo $this->params->get('blog_class_leading'); ?>">
|
||||
<?php foreach ($this->lead_items as &$item) : ?>
|
||||
<div class="blog-item">
|
||||
<?php
|
||||
$this->item = & $item;
|
||||
echo $this->loadTemplate('item');
|
||||
?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($this->intro_items)) : ?>
|
||||
<?php $blogClass = $this->params->get('blog_class', ''); ?>
|
||||
<?php if ((int) $this->params->get('num_columns') > 1) : ?>
|
||||
<?php $blogClass .= (int) $this->params->get('multi_column_order', 0) === 0 ? ' masonry-' : ' columns-'; ?>
|
||||
<?php $blogClass .= (int) $this->params->get('num_columns'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="swiper-controls container">
|
||||
<div class="swiper-button-next swiper-button-next"></div>
|
||||
<div class="swiper-button-prev swiper-button-prev"></div>
|
||||
</div>
|
||||
<div class="swiper carosellofeatured">
|
||||
<div class="swiper-wrapper">
|
||||
<?php foreach ($this->intro_items as $key => &$item) : ?>
|
||||
<div class="swiper-slide">
|
||||
<div class="swiper-content pt-3 pb-5">
|
||||
<?php
|
||||
$this->item = & $item;
|
||||
echo $this->loadTemplate('item');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($this->link_items)) : ?>
|
||||
<div class="items-more">
|
||||
<?php echo $this->loadTemplate('links'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->pagesTotal > 1)) : ?>
|
||||
<div class="w-100">
|
||||
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
|
||||
<p class="counter float-end pt-3 pe-2">
|
||||
<?php echo $this->pagination->getPagesCounter(); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,136 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Associations;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
|
||||
use Joomla\Component\Content\Site\Helper\RouteHelper;
|
||||
|
||||
/** @var \Joomla\Component\Content\Site\View\Featured\HtmlView $this */
|
||||
// Create a shortcut for params.
|
||||
$params = &$this->item->params;
|
||||
$canEdit = $this->item->params->get('access-edit');
|
||||
$info = $this->item->params->get('info_block_position', 0);
|
||||
|
||||
// Check if associations are implemented. If they are, define the parameter.
|
||||
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
|
||||
|
||||
$currentDate = Factory::getDate()->format('Y-m-d H:i:s');
|
||||
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
|
||||
$isNotPublishedYet = $this->item->publish_up > $currentDate;
|
||||
$isUnpublished = $this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $isNotPublishedYet || $isExpired;
|
||||
?>
|
||||
|
||||
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
|
||||
|
||||
<div class="item-content">
|
||||
<?php if ($isUnpublished) : ?>
|
||||
<div class="system-unpublished">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_title')) : ?>
|
||||
<span class="item-title">
|
||||
<?php if ($params->get('link_titles') && $params->get('access-view')) : ?>
|
||||
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>">
|
||||
<?php echo $this->escape($this->item->title); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($this->item->title); ?>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED) : ?>
|
||||
<span class="badge bg-warning text-light"><?php echo Text::_('JUNPUBLISHED'); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if ($isNotPublishedYet) : ?>
|
||||
<span class="badge bg-warning text-light"><?php echo Text::_('JNOTPUBLISHEDYET'); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if ($isExpired) : ?>
|
||||
<span class="badge bg-warning text-light"><?php echo Text::_('JEXPIRED'); ?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($canEdit) : ?>
|
||||
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php // Content is generated by content plugin event "onContentAfterTitle" ?>
|
||||
<?php echo $this->item->event->afterDisplayTitle; ?>
|
||||
|
||||
<?php // @todo Not that elegant would be nice to group the params ?>
|
||||
<?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|
||||
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam); ?>
|
||||
|
||||
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
|
||||
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'above']); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
|
||||
<?php echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
|
||||
<?php echo $this->item->event->beforeDisplayContent; ?>
|
||||
|
||||
<?php echo $this->item->introtext; ?>
|
||||
<?php
|
||||
/*$introtext = $this->item->introtext;
|
||||
|
||||
// Rimuovi i tag HTML
|
||||
$clean_introtext = strip_tags($introtext);
|
||||
|
||||
// Limita a 100 caratteri
|
||||
$limited_introtext = mb_substr($clean_introtext, 0, 100);
|
||||
|
||||
// Aggiungi "..." se il testo originale era più lungo
|
||||
if (mb_strlen($clean_introtext) > 130) {
|
||||
$limited_introtext .= '...';
|
||||
}*/
|
||||
?>
|
||||
|
||||
<?php //echo htmlspecialchars($limited_introtext); ?>
|
||||
|
||||
<?php if ($info == 1 || $info == 2) : ?>
|
||||
<?php if ($useDefList) : ?>
|
||||
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
|
||||
<?php echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_readmore') && $this->item->readmore) :
|
||||
if ($params->get('access-view')) :
|
||||
$link = Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));
|
||||
else :
|
||||
$menu = Factory::getApplication()->getMenu();
|
||||
$active = $menu->getActive();
|
||||
$itemId = $active->id;
|
||||
$link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false));
|
||||
$link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)));
|
||||
endif; ?>
|
||||
|
||||
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($isUnpublished) : ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
|
||||
<?php echo $this->item->event->afterDisplayContent; ?>
|
||||
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\Component\Content\Site\Helper\RouteHelper;
|
||||
|
||||
/** @var \Joomla\Component\Content\Site\View\Featured\HtmlView $this */
|
||||
?>
|
||||
<ul class="com-content-blog__links">
|
||||
<?php foreach ($this->link_items as $item) : ?>
|
||||
<li class="com-content-blog__link">
|
||||
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language)); ?>">
|
||||
<?php echo $item->title; ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
25
templates/joomla-italia-theme/html/mod_highlights/blank.php
Normal file
25
templates/joomla-italia-theme/html/mod_highlights/blank.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version CVS: 1.0.0
|
||||
* @package com_highlights
|
||||
* @subpackage mod_highlights
|
||||
* @author Eddy Prosperi <eddy.prosperi@protocollicreativi.it>
|
||||
* @copyright 2024 Eddy Prosperi
|
||||
* @license GNU General Public License versione 2 o successiva; vedi LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use \Joomla\CMS\Filter\InputFilter;
|
||||
|
||||
$safe_htmltags = array(
|
||||
'a', 'address', 'em', 'strong', 'b', 'i',
|
||||
'big', 'small', 'sub', 'sup', 'cite', 'code',
|
||||
'img', 'ul', 'ol', 'li', 'dl', 'lh', 'dt', 'dd',
|
||||
'br', 'p', 'table', 'th', 'td', 'tr', 'pre',
|
||||
'blockquote', 'nowiki', 'h1', 'h2', 'h3',
|
||||
'h4', 'h5', 'h6', 'hr');
|
||||
|
||||
/* @var $params Joomla\Registry\Registry */
|
||||
$filter = InputFilter::getInstance($safe_htmltags);
|
||||
echo $filter->clean($params->get('html_content'));
|
||||
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version CVS: 1.0.0
|
||||
* @package com_highlights
|
||||
* @subpackage mod_highlights
|
||||
* @author Eddy Prosperi <eddy.prosperi@protocollicreativi.it>
|
||||
* @copyright 2024 Eddy Prosperi
|
||||
* @license GNU General Public License versione 2 o successiva; vedi LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Pcrt\Module\Highlights\Site\Helper\HighlightsHelper;
|
||||
|
||||
$elements = HighlightsHelper::getList($params);
|
||||
|
||||
$tableField = explode(':', $params->get('field'));
|
||||
$table_name = !empty($tableField[0]) ? $tableField[0] : '';
|
||||
$field_name = !empty($tableField[1]) ? $tableField[1] : '';
|
||||
|
||||
//Come accedere alle variabili generali:
|
||||
$opacita = $params->get('opacita', []);
|
||||
$sfondo = $params->get('sfondo', []);
|
||||
|
||||
?>
|
||||
|
||||
<?php if (!empty($elements)) : ?>
|
||||
<div class="bd-example w-100">
|
||||
<div class="bd-example-tabs">
|
||||
<div class="row">
|
||||
<!-- Macro a sinistra -->
|
||||
<div class="col-4 col-md-3">
|
||||
<div class="nav nav-tabs nav-tabs-vertical nav-tabs-vertical-background" id="nav-vertical-tab-bg" role="tablist" aria-orientation="vertical">
|
||||
<?php foreach ($elements as $index => $element) : ?>
|
||||
<a class="nav-link <?php echo $index === 0 ? 'active' : ''; ?>" id="nav-vertical-tab-<?php echo $index; ?>-tab" data-bs-toggle="tab" href="#nav-vertical-tab-<?php echo $index; ?>" role="tab" aria-controls="nav-vertical-tab-<?php echo $index; ?>" aria-selected="<?php echo $index === 0 ? 'true' : 'false'; ?>">
|
||||
<?php echo $element->sottotitolo; ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Contenuto a destra -->
|
||||
<div class="col-8 col-md-9">
|
||||
<div class="tab-content" id="nav-vertical-tab-bgContent">
|
||||
<?php foreach ($elements as $index => $element) : ?>
|
||||
<div class="tab-pane p-3 fade <?php echo $index === 0 ? 'active show' : ''; ?>" id="nav-vertical-tab-<?php echo $index; ?>" role="tabpanel" aria-labelledby="nav-vertical-tab-<?php echo $index; ?>-tab">
|
||||
<div><?php echo $element->titolo; ?></div>
|
||||
<div><?php echo $element->sottotitolo; ?></div>
|
||||
<div><?php echo $element->descrizione; ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version CVS: 1.0.0
|
||||
* @package com_highlights
|
||||
* @subpackage mod_highlights
|
||||
* @author Eddy Prosperi <eddy.prosperi@protocollicreativi.it>
|
||||
* @copyright 2024 Eddy Prosperi
|
||||
* @license GNU General Public License versione 2 o successiva; vedi LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Pcrt\Module\Highlights\Site\Helper\HighlightsHelper;
|
||||
|
||||
$elements = HighlightsHelper::getList($params);
|
||||
|
||||
$tableField = explode(':', $params->get('field'));
|
||||
$table_name = !empty($tableField[0]) ? $tableField[0] : '';
|
||||
$field_name = !empty($tableField[1]) ? $tableField[1] : '';
|
||||
|
||||
//Come accedere alle variabili generali:
|
||||
$opacita = $params->get('opacita', []);
|
||||
$sfondo = $params->get('sfondo', []);
|
||||
|
||||
?>
|
||||
|
||||
<?php if (!empty($elements)) : ?>
|
||||
<div class="bd-example w-100">
|
||||
<div class="bd-example-tabs">
|
||||
<div class="row">
|
||||
<!-- Macro a sinistra -->
|
||||
<div class="col-4 col-md-3">
|
||||
<div class="nav nav-tabs nav-tabs-vertical nav-tabs-vertical-background" id="nav-vertical-tab-bg" role="tablist" aria-orientation="vertical">
|
||||
<?php foreach ($elements as $index => $element) : ?>
|
||||
<a class="nav-link <?php echo $index === 0 ? 'active' : ''; ?>" id="nav-vertical-tab-<?php echo $index; ?>-tab" data-bs-toggle="tab" href="#nav-vertical-tab-<?php echo $index; ?>" role="tab" aria-controls="nav-vertical-tab-<?php echo $index; ?>" aria-selected="<?php echo $index === 0 ? 'true' : 'false'; ?>">
|
||||
<?php echo $element->titolo; ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Contenuto a destra -->
|
||||
<div class="col-8 col-md-9">
|
||||
<div class="tab-content" id="nav-vertical-tab-bgContent">
|
||||
<?php foreach ($elements as $index => $element) : ?>
|
||||
<div class="tab-pane p-3 fade <?php echo $index === 0 ? 'active show' : ''; ?>" id="nav-vertical-tab-<?php echo $index; ?>" role="tabpanel" aria-labelledby="nav-vertical-tab-<?php echo $index; ?>-tab">
|
||||
<div><?php echo $element->titolo; ?></div>
|
||||
<div><?php echo $element->sottotitolo; ?></div>
|
||||
<div><?php echo $element->descrizione; ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
32
templates/joomla-italia-theme/html/mod_highlights/item.php
Normal file
32
templates/joomla-italia-theme/html/mod_highlights/item.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* @version CVS: 1.0.0
|
||||
* @package com_highlights
|
||||
* @subpackage mod_highlights
|
||||
* @author Eddy Prosperi <eddy.prosperi@protocollicreativi.it>
|
||||
* @copyright 2024 Eddy Prosperi
|
||||
* @license GNU General Public License versione 2 o successiva; vedi LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Pcrt\Module\Highlights\Site\Helper\HighlightsHelper;
|
||||
|
||||
$element = HighlightsHelper::getItem($params);
|
||||
?>
|
||||
|
||||
<?php if (!empty($element)) : ?>
|
||||
<div>
|
||||
<?php $fields = get_object_vars($element); ?>
|
||||
<?php foreach ($fields as $field_name => $field_value) : ?>
|
||||
<?php if (HighlightsHelper::shouldAppear($field_name)): ?>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<strong><?php echo HighlightsHelper::renderTranslatableHeader($params->get('item_table'), $field_name); ?></strong>
|
||||
</div>
|
||||
<div
|
||||
class="span8"><?php echo HighlightsHelper::renderElement($params->get('item_table'), $field_name, $field_value); ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
32
templates/joomla-italia-theme/html/mod_highlights/list.php
Normal file
32
templates/joomla-italia-theme/html/mod_highlights/list.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* @version CVS: 1.0.0
|
||||
* @package com_highlights
|
||||
* @subpackage mod_highlights
|
||||
* @author Eddy Prosperi <eddy.prosperi@protocollicreativi.it>
|
||||
* @copyright 2024 Eddy Prosperi
|
||||
* @license GNU General Public License versione 2 o successiva; vedi LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Pcrt\Module\Highlights\Site\Helper\HighlightsHelper;
|
||||
|
||||
$elements = HighlightsHelper::getList($params);
|
||||
|
||||
$tableField = explode(':', $params->get('field'));
|
||||
$table_name = !empty($tableField[0]) ? $tableField[0] : '';
|
||||
$field_name = !empty($tableField[1]) ? $tableField[1] : '';
|
||||
?>
|
||||
|
||||
<?php if (!empty($elements)) : ?>
|
||||
<table class="jcc-table">
|
||||
<?php foreach ($elements as $element) : ?>
|
||||
<tr>
|
||||
<th><?php echo HighlightsHelper::renderTranslatableHeader($table_name, $field_name); ?></th>
|
||||
<td><?php echo HighlightsHelper::renderElement(
|
||||
$table_name, $params->get('field'), $element->{$field_name}
|
||||
); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php endif;
|
||||
56
templates/joomla-italia-theme/html/mod_highlights/slide.php
Normal file
56
templates/joomla-italia-theme/html/mod_highlights/slide.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version CVS: 1.0.0
|
||||
* @package com_highlights
|
||||
* @subpackage mod_highlights
|
||||
* @author Eddy Prosperi <eddy.prosperi@protocollicreativi.it>
|
||||
* @copyright 2024 Eddy Prosperi
|
||||
* @license GNU General Public License versione 2 o successiva; vedi LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Pcrt\Module\Highlights\Site\Helper\HighlightsHelper;
|
||||
|
||||
$elements = HighlightsHelper::getList($params);
|
||||
|
||||
$tableField = explode(':', $params->get('field'));
|
||||
$table_name = !empty($tableField[0]) ? $tableField[0] : '';
|
||||
$field_name = !empty($tableField[1]) ? $tableField[1] : '';
|
||||
|
||||
//Come accedere alle variabili generali:
|
||||
$opacita = $params->get('opacita', []);
|
||||
$sfondo = $params->get('sfondo', []);
|
||||
|
||||
?>
|
||||
|
||||
<?php if (!empty($elements)) : ?>
|
||||
<div class="bd-example w-100">
|
||||
<div class="bd-example-tabs">
|
||||
<div class="row">
|
||||
<!-- Macro a sinistra -->
|
||||
<div class="col-4 col-md-3">
|
||||
<div class="nav nav-tabs nav-tabs-vertical nav-tabs-vertical-background" id="nav-vertical-tab-bg" role="tablist" aria-orientation="vertical">
|
||||
<?php foreach ($elements as $index => $element) : ?>
|
||||
<a class="nav-link <?php echo $index === 0 ? 'active' : ''; ?>" id="nav-vertical-tab-<?php echo $index; ?>-tab" data-bs-toggle="tab" href="#nav-vertical-tab-<?php echo $index; ?>" role="tab" aria-controls="nav-vertical-tab-<?php echo $index; ?>" aria-selected="<?php echo $index === 0 ? 'true' : 'false'; ?>">
|
||||
<?php echo $element->sottotitolo; ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Contenuto a destra -->
|
||||
<div class="col-8 col-md-9">
|
||||
<div class="tab-content" id="nav-vertical-tab-bgContent">
|
||||
<?php foreach ($elements as $index => $element) : ?>
|
||||
<div class="tab-pane p-3 fade <?php echo $index === 0 ? 'active show' : ''; ?>" id="nav-vertical-tab-<?php echo $index; ?>" role="tabpanel" aria-labelledby="nav-vertical-tab-<?php echo $index; ?>-tab">
|
||||
<div><?php echo $element->titolo; ?></div>
|
||||
<div><?php echo $element->sottotitolo; ?></div>
|
||||
<div><?php echo $element->descrizione; ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@ -238,6 +238,7 @@ $wa->usePreset('template.joomla-italia-theme')
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<jdoc:include type="modules" name="above" style="above" />
|
||||
<jdoc:include type="component" />
|
||||
<jdoc:include type="modules" name="below" style="below" />
|
||||
<jdoc:include type="modules" name="user" style="user" />
|
||||
|
||||
@ -131,6 +131,31 @@
|
||||
"core"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "swiper.js.scripts",
|
||||
"description": "The file containing the javascript for swiper.",
|
||||
"type": "script",
|
||||
"uri": "swiper-bundle.min.js",
|
||||
"attributes" : {
|
||||
"defer": false
|
||||
},
|
||||
"dependencies": [
|
||||
"core"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "swiper.css.styles",
|
||||
"description": "The default css style to use.",
|
||||
"type": "style",
|
||||
"uri": "swiper-bundle.min.css",
|
||||
"dependencies": [
|
||||
"template.css.pcrt-jit"
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"name": "template.joomla-italia-theme",
|
||||
"type": "preset",
|
||||
|
||||
Reference in New Issue
Block a user