primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1,49 @@
<?php
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
$app = Factory::getApplication();
$input = $app->getInput();
$wa = $this->getWebAssetManager();
$menu = $app->getMenu()->getActive();
$isHomePage = ($menu->home);
$credits = '<a href="https://www.protocollicreativi.it" target="_blank" rel="nofollow" title="Protocolli Creativi is a Joomla Provider">Made with love Joomla Italia Theme by Protocolli Creativi</a>';
$pageclass = $menu !== null ? $menu->getParams()->get('pageclass_sfx', '') : '';
$this->setMetaData('viewport', 'width=device-width, initial-scale=1, minimum-scale=1');
$this->setMetaData('theme-color', '#ffffff');
// Browsers support SVG favicons
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
$this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']);
$wa->registerAndUseStyle('template.css.editor', 'media/templates/site/joomla-italia-theme/css/editor.css');
$wa->usePreset('template.joomla-italia-theme')
->useStyle('css.fontawesome')
->useStyle('css.fonts')
->useStyle('template.css.pcrt-main')
->useStyle('template.css.pcrt-menu')
->useStyle('template.css.pcrt-jit')
->useStyle('css.table')
->useScript('template.js.jquery362');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="metas" />
<jdoc:include type="styles" />
<jdoc:include type="scripts" />
</head>
<body class="<?php echo $pageclass ? htmlspecialchars($pageclass) : ''; ?>">
<jdoc:include type="message" />
<jdoc:include type="component" />
</body>
</html>

View File

@ -0,0 +1,255 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
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;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get('sitename');
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="pagina-circolari greendark">
<section class="section bg-white py-2 py-lg-3 py-xl-5">
<div class="container">
<div class="row align-items-center">
<div class="col-auto d-none d-sm-block">
<div class="section-thumb-article mx-3">
<?php if ($fullimg->image_fulltext =='') {
?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?=$baseImagePath?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php
} else {
echo LayoutHelper::render('joomla.content.full_image', $this->item);
}
?>
</div>
</div>
<div class="ps-0 ps-lg-3 col col-lg-6 col-xl-7">
<?php // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<div class="section-title">
<h1 data-element="service-title" class="mb-3"><?php echo $this->escape($this->item->title); ?></h1>
<p data-element="service-description"><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
</div>
<div class="col-12 col-lg">
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-servizio mt-4">
<h2 class="h6">Argomenti</h2>
<div class="badges purplelight">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="greendark aside-main aside-sticky mt-5">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?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 ($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 if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?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 endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,154 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
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;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// 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');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
?>
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 pe-0 pt-0 pt-lg-2 order-2 order-lg-1 mb-3">
<aside class="aside-main aside-sticky">
<?php echo JHtml::_('content.prepare', '{loadposition psl}'); ?>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 pt-lg-5 order-1 order-lg-2">
<div class="com-content-article item-page<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Article">
<meta itemprop="inLanguage" content="<?php echo ($this->item->language === '*') ? Factory::getApplication()->get('language') : $this->item->language; ?>">
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?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 ($params->get('show_title')) : ?>
<div class="page-header">
<h1 itemprop="headline">
<?php echo $this->escape($this->item->title); ?>
</h1>
<?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; ?>
</div>
<?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 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 $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php echo LayoutHelper::render('joomla.content.full_image', $this->item); ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<div itemprop="articleBody" class="com-content-article__body">
<?php echo $this->item->text; ?>
</div>
<?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 $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,253 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
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;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get('sitename');
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<!--
<?php //if ($fullimg->image_fulltext !=''): ?>
<section class="section bg-white py-5 position-relative d-block d-lg-flex align-items-center overflow-hidden section-hero">
<div class="title-img" style="background-image: url('<?php //echo $fullimg->image_fulltext; ?>');"></div>
<div class="container">
<div class="row align-items-center">
<div class="col-md-5">
<div class="hero-title">
<h1><?php //echo $this->escape($this->item->title); ?></h1>
</div>
</div>
</div>
</div>
</section>
<?php //else: ?>
<section class="section bg-white py-5">
<div class="container">
<h1><?php //echo $this->escape($this->item->title); ?></h1>
</div>
</section>
<?php //endif; ?>
-->
<div class="pagina-default">
<div class="">
<div class="container">
<div class="row px-3">
<div class="col-12 col-lg-9">
<section class="accauno-title pb-3 mb-4">
<h1><?php echo $this->escape($this->item->title); ?></h1>
</section>
<article class="article-wrapper">
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?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 ($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 if ($useDefList && ($info == 0 || $info == 2)) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'above']); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php echo $this->item->text ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?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 endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
</article>
</div>
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="aside-main aside-sticky mt-5 ms-4 ms-lg-0">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-section px-4 mt-5">
<h2 class="h6">Argomenti</h2>
<div class="badges">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
</aside>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,279 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
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;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');
;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get('sitename');
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="pagina-scuola redbrown">
<section class="section bg-white py-2 py-lg-3 py-xl-5">
<div class="container">
<div class="row align-items-center">
<div class="col-auto d-none d-sm-block">
<div class="section-thumb-article mx-3">
<?php if($fullimg->image_fulltext =='') { ?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php } else {
echo LayoutHelper::render('joomla.content.full_image', $this->item);
}
?>
</div>
</div>
<div class="ps-0 ps-lg-3 col col-lg-6 col-xl-7">
<div class="section-title">
<h1 data-element="service-title" class="mb-3"><?php echo $this->escape($this->item->title); ?></h1>
<p data-element="service-description"><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
</div>
<div class="col-12 col-lg">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-servizio mt-4">
<h2 class="h6">Argomenti</h2>
<div class="badges purplelight">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="redbrown aside-main aside-sticky" id="page-index">
<div class="aside-title" id="page-index">
<a class="toggle-link-list" data-bs-toggle="collapse" href="#lista-paragrafi" role="button" aria-expanded="false" aria-controls="lista-paragrafi" aria-label="apri / chiudi indice della pagina">
<span>Indice della pagina</span>
<svg class="icon icon-toggle"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
</div>
<div id="lista-paragrafi" class="link-list-wrapper collapse show" role="region" aria-labelledby="page-index">
<ul class="link-list" data-element="page-index">
<?php
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
JModelLegacy::addIncludePath(JPATH_SITE. '/components/com_content/models', 'ContentModel');
$id = JFactory::getApplication()->input->get('id');
$model = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request'=>true));
$appParams = JFactory::getApplication()->getParams();
$model->setState('params', $appParams);
$item = $model->getItem($id);
$jcFields = FieldsHelper::getFields('com_content.article', $item, true);
?>
<?php foreach($jcFields as $jcField) { ?>
<?php if ($jcField->value !='') { ?>
<li><a href="#art-par-<?php echo $jcField->id; ?>" aria-label="Vai al paragrafo <?php echo $jcField->title; ?>" data-focus-mouse="false"><?php echo $jcField->title; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?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 ($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 // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?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 endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,278 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
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;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get( 'sitename' );
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<section class="section bg-white py-5 position-relative d-block d-lg-flex align-items-center overflow-hidden section-hero">
<?php if($fullimg->image_fulltext !=''): ?>
<div class="title-img" style="background-image: url('<?php echo $fullimg->image_fulltext; ?>');"></div>
<?php else: ?>
<div class="title-img bg-greendark bg-greendarkgradient d-none d-md-block">
<svg width="100%" height="100%" viewBox="0 0 726 360" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Group" opacity="0.32"><path id="Rectangle" d="M627.751,245.625l-396.368,-193.321l-193.322,396.368l396.368,193.321l193.322,-396.368Z" style="fill:url(#_Linear1);"></path><path id="Rectangle1" serif:id="Rectangle" d="M583.359,-179.506l-264.865,159.147l159.147,264.865l264.865,-159.147l-159.147,-264.865Z" style="fill:url(#_Linear2);"></path><path id="Rectangle2" serif:id="Rectangle" d="M210.182,-54.565l-213.341,33.79l33.79,213.34l213.341,-33.79l-33.79,-213.34Z" style="fill:url(#_Linear3);"></path></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(203.046,589.69,-589.69,203.046,231.383,52.3035)"><stop offset="0" style="stop-color:#0f842e;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(344.438,-26.7144,26.7144,344.438,398.068,112.073)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(230.236,72.8805,-72.8805,230.236,13.7359,85.8949)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient></defs>
</svg>
</div>
<?php endif; ?>
<div class="container">
<div class="row align-items-center">
<div class="col-md-5">
<div class="hero-title">
<h1><?php echo $this->escape($this->item->title); ?></h1>
<p><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-section px-4 mt-5">
<h2 class="h6">Argomenti</h2>
<div class="badges greenlight">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<div class="pagina-eventi greendark">
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="greendark aside-main aside-sticky" id="page-index">
<div class="aside-title" id="page-index">
<a class="toggle-link-list" data-bs-toggle="collapse" href="#lista-paragrafi" role="button" aria-expanded="false" aria-controls="lista-paragrafi" aria-label="apri / chiudi indice della pagina">
<span>Indice della pagina</span>
<svg class="icon icon-toggle"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
</div>
<div id="lista-paragrafi" class="link-list-wrapper collapse show" role="region" aria-labelledby="page-index">
<ul class="link-list" data-element="page-index">
<?php
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
JModelLegacy::addIncludePath(JPATH_SITE. '/components/com_content/models', 'ContentModel');
$id = JFactory::getApplication()->input->get('id');
$model = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request'=>true));
$appParams = JFactory::getApplication()->getParams();
$model->setState('params', $appParams);
$item = $model->getItem($id);
$jcFields = FieldsHelper::getFields('com_content.article', $item, true);
?>
<?php foreach($jcFields as $jcField) { ?>
<?php if ($jcField->value !=''){ ?>
<li><a href="#art-par-<?php echo $jcField->id; ?>" aria-label="Vai al paragrafo <?php echo $jcField->title; ?>" data-focus-mouse="false"><?php echo $jcField->title; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<div class="row variable-gutters">
<div class="col-lg-12 d-flex justify-content-end">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?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 ($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 // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?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 endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests ?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article. ?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,176 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
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;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// 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');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
/*if ($this->item->title == 'Licenza dei contenuti'){
$valid_titolo_note_legali = 'data-element="legal-notes-section"';
}*/
?>
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 mt-5">
<div class="com-content-article item-page<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Article">
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?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 ($params->get('show_title')) : ?>
<div class="page-header">
<?php if ($this->item->title == 'Licenza dei contenuti'){ ?>
<h1 data-element="legal-notes-section"><?php echo $this->escape($this->item->title); ?></h1>
<?php } else { ?>
<h1><?php echo $this->escape($this->item->title); ?></h1>
<?php } ?>
<?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; ?>
</div>
<?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 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 $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php echo LayoutHelper::render('joomla.content.full_image', $this->item); ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<div itemprop="articleBody" class="com-content-article__body">
<?php
if ($this->item->title = 'Licenza dei contenuti'){
$descrizione = $this->item->text;
$dom = new DOMDocument('1.0','UTF-8');
$dom->loadHTML(mb_convert_encoding($descrizione, 'HTML-ENTITIES', "UTF-8"));
//$dom->loadHTML(mb_convert_encoding($descrizione, 'HTML-ENTITIES', "UTF-8"), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$xpath = new DOMXPath($dom);
$tags = $xpath->evaluate("//p");
foreach ($tags as $tag) {
$tag->setAttribute("data-element", "legal-notes-body");
}
$descrizione = $dom->saveHTML();
echo $descrizione;
}else{
echo $this->item->text;
}
?>
</div>
<?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 $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests ?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article. ?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,249 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
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;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get( 'sitename' );
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<section class="section bg-white py-5 position-relative d-block d-lg-flex align-items-center overflow-hidden section-hero">
<?php if($fullimg->image_fulltext !=''): ?>
<div class="title-img" style="background-image: url('<?php echo $fullimg->image_fulltext; ?>');"></div>
<?php else: ?>
<div class="title-img bg-greendark bg-greendarkgradient d-none d-md-block">
<svg width="100%" height="100%" viewBox="0 0 726 360" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Group" opacity="0.32"><path id="Rectangle" d="M627.751,245.625l-396.368,-193.321l-193.322,396.368l396.368,193.321l193.322,-396.368Z" style="fill:url(#_Linear1);"></path><path id="Rectangle1" serif:id="Rectangle" d="M583.359,-179.506l-264.865,159.147l159.147,264.865l264.865,-159.147l-159.147,-264.865Z" style="fill:url(#_Linear2);"></path><path id="Rectangle2" serif:id="Rectangle" d="M210.182,-54.565l-213.341,33.79l33.79,213.34l213.341,-33.79l-33.79,-213.34Z" style="fill:url(#_Linear3);"></path></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(203.046,589.69,-589.69,203.046,231.383,52.3035)"><stop offset="0" style="stop-color:#0f842e;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(344.438,-26.7144,26.7144,344.438,398.068,112.073)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(230.236,72.8805,-72.8805,230.236,13.7359,85.8949)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient></defs>
</svg>
</div>
<?php endif; ?>
<div class="container">
<div class="row align-items-center">
<div class="col-md-5">
<div class="hero-title">
<h1><?php echo $this->escape($this->item->title); ?></h1>
<p><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-section px-4 mt-5">
<h2 class="h6">Argomenti</h2>
<div class="badges greenlight">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<div class="pagina-novita greendark">
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="greendark aside-main aside-sticky mt-5 ms-4 ms-lg-0">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?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 ($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 if ($useDefList && ($info == 0 || $info == 2)) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'above']); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?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 endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests ?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article. ?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,278 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
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;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get( 'sitename' );
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<section class="section bg-white py-5 position-relative d-block d-lg-flex align-items-center overflow-hidden section-hero">
<?php if($fullimg->image_fulltext !=''): ?>
<div class="title-img" style="background-image: url('<?php echo $fullimg->image_fulltext; ?>');"></div>
<?php else: ?>
<div class="title-img bg-bluelectric d-none d-md-block">
<svg width="100%" height="100%" viewBox="0 0 726 360" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Group" opacity="0.32"><path id="Rectangle" d="M627.751,245.625l-396.368,-193.321l-193.322,396.368l396.368,193.321l193.322,-396.368Z" style="fill:url(#_Linear1);"></path><path id="Rectangle1" serif:id="Rectangle" d="M583.359,-179.506l-264.865,159.147l159.147,264.865l264.865,-159.147l-159.147,-264.865Z" style="fill:url(#_Linear2);"></path><path id="Rectangle2" serif:id="Rectangle" d="M210.182,-54.565l-213.341,33.79l33.79,213.34l213.341,-33.79l-33.79,-213.34Z" style="fill:url(#_Linear3);"></path></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(203.046,589.69,-589.69,203.046,231.383,52.3035)"><stop offset="0" style="stop-color:#0f842e;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(344.438,-26.7144,26.7144,344.438,398.068,112.073)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(230.236,72.8805,-72.8805,230.236,13.7359,85.8949)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient></defs>
</svg>
</div>
<?php endif; ?>
<div class="container">
<div class="row align-items-center">
<div class="col-md-5">
<div class="hero-title">
<h1><?php echo $this->escape($this->item->title); ?></h1>
<p><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-section px-4 mt-5">
<h2 class="h6">Argomenti</h2>
<div class="badges bluelectric">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<div class="pagina-progetti bluelectric">
<div class="border-row bluelectric">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="bluelectric aside-main aside-sticky" id="page-index">
<div class="aside-title" id="page-index">
<a class="toggle-link-list" data-bs-toggle="collapse" href="#lista-paragrafi" role="button" aria-expanded="false" aria-controls="lista-paragrafi" aria-label="apri / chiudi indice della pagina">
<span>Indice della pagina</span>
<svg class="icon icon-toggle"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
</div>
<div id="lista-paragrafi" class="link-list-wrapper collapse show" role="region" aria-labelledby="page-index">
<ul class="link-list" data-element="page-index">
<?php
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
JModelLegacy::addIncludePath(JPATH_SITE. '/components/com_content/models', 'ContentModel');
$id = JFactory::getApplication()->input->get('id');
$model = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request'=>true));
$appParams = JFactory::getApplication()->getParams();
$model->setState('params', $appParams);
$item = $model->getItem($id);
$jcFields = FieldsHelper::getFields('com_content.article', $item, true);
?>
<?php foreach($jcFields as $jcField) { ?>
<?php if ($jcField->value !=''){ ?>
<li><a href="#art-par-<?php echo $jcField->id; ?>" aria-label="Vai al paragrafo <?php echo $jcField->title; ?>" data-focus-mouse="false"><?php echo $jcField->title; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<div class="row variable-gutters">
<div class="col-lg-12 d-flex justify-content-end">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?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 ($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 // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?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 endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests ?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article. ?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,279 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
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;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');
;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get('sitename');
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="pagina-schede bluelectric">
<section class="section bg-white py-2 py-lg-3 py-xl-5">
<div class="container">
<div class="row align-items-center">
<div class="col-auto d-none d-sm-block">
<div class="section-thumb-article mx-3">
<?php if($fullimg->image_fulltext =='') { ?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php } else {
echo LayoutHelper::render('joomla.content.full_image', $this->item);
}
?>
</div>
</div>
<div class="ps-0 ps-lg-3 col col-lg-6 col-xl-7">
<div class="section-title">
<h1 data-element="service-title" class="mb-3"><?php echo $this->escape($this->item->title); ?></h1>
<p data-element="service-description"><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
</div>
<div class="col-12 col-lg">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-servizio mt-4">
<h2 class="h6">Argomenti</h2>
<div class="badges bluelectric">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<div class="border-row bluelectric">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="bluelectric aside-main aside-sticky" id="page-index">
<div class="aside-title" id="page-index">
<a class="toggle-link-list" data-bs-toggle="collapse" href="#lista-paragrafi" role="button" aria-expanded="false" aria-controls="lista-paragrafi" aria-label="apri / chiudi indice della pagina">
<span>Indice della pagina</span>
<svg class="icon icon-toggle"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
</div>
<div id="lista-paragrafi" class="link-list-wrapper collapse show" role="region" aria-labelledby="page-index">
<ul class="link-list" data-element="page-index">
<?php
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
JModelLegacy::addIncludePath(JPATH_SITE. '/components/com_content/models', 'ContentModel');
$id = JFactory::getApplication()->input->get('id');
$model = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request'=>true));
$appParams = JFactory::getApplication()->getParams();
$model->setState('params', $appParams);
$item = $model->getItem($id);
$jcFields = FieldsHelper::getFields('com_content.article', $item, true);
?>
<?php foreach($jcFields as $jcField) { ?>
<?php if ($jcField->value !='') { ?>
<li><a href="#art-par-<?php echo $jcField->id; ?>" aria-label="Vai al paragrafo <?php echo $jcField->title; ?>" data-focus-mouse="false"><?php echo $jcField->title; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?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 ($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 // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?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 endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,268 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
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;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');
;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get('sitename');
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="pagina-servizio purplelight">
<section class="section bg-white py-2 py-lg-3 py-xl-5">
<div class="container">
<div class="row align-items-center">
<div class="col-auto d-none d-sm-block">
<div class="section-thumb-article mx-3">
<?php if($fullimg->image_fulltext =='') { ?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php } else {
echo LayoutHelper::render('joomla.content.full_image', $this->item);
}
?>
</div>
</div>
<div class="ps-0 ps-lg-3 col col-lg-6 col-xl-7">
<div class="section-title">
<h1 data-element="service-title" class="mb-3"><?php echo $this->escape($this->item->title); ?></h1>
<p data-element="service-description"><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
</div>
<div class="col-12 col-lg">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-servizio mt-4">
<h2 class="h6">Argomenti</h2>
<div class="badges purplelight">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="purplelight aside-main aside-sticky" id="page-index">
<div class="aside-title" id="page-index">
<a class="toggle-link-list" data-bs-toggle="collapse" href="#lista-paragrafi" role="button" aria-expanded="false" aria-controls="lista-paragrafi" aria-label="apri / chiudi indice della pagina">
<span>Indice della pagina</span>
<svg class="icon icon-toggle"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
</div>
<div id="lista-paragrafi" class="link-list-wrapper collapse show" role="region" aria-labelledby="page-index">
<ul class="link-list" data-element="page-index">
<li><a href="#art-par-01" aria-label="Vai al paragrafo Cos'è">Cos'è</a></li>
<li><a href="#art-par-02" aria-label="Vai al paragrafo Come si accede al servizio" data-focus-mouse="false">Come si accede al servizio</a></li>
<li><a href="#art-par-03" aria-label="Vai al paragrafo Cosa serve" data-focus-mouse="false">Cosa serve</a></li>
<li><a href="#art-par-04" aria-label="Vai al paragrafo Tempi e scadenze" data-focus-mouse="false">Tempi e scadenze</a></li>
<li><a href="#art-par-05" aria-label="Vai al paragrafo Contatti">Contatti</a></li>
<li><a href="#art-par-06" aria-label="Vai al paragrafo Ulteriori informazioni">Ulteriori informazioni</a></li>
</ul>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<article class="article-wrapper purplelight <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?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 ($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 // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?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 endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,223 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
use Joomla\CMS\Uri\Uri;
$url = Uri::root();
$app = Factory::getApplication();
$this->category->text = $this->category->description;
$app->triggerEvent('onContentPrepare', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$this->category->description = $this->category->text;
$results = $app->triggerEvent('onContentAfterTitle', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayTitle = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentBeforeDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$beforeDisplayContent = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentAfterDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayContent = trim(implode("\n", $results));
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
//echo json_encode($this->category);
//echo $this->category->parent_id;
$catactive = $this->category->title;
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="blogj4a blog-category" itemscope itemtype="https://schema.org/Blog">
<section class="section bg-purplelight bg-purplegradient py-5 position-relative d-flex align-items-center overflow-hidden">
<div class="purple-oval-forms">
<svg width="100%" height="100%" viewBox="0 0 578 359" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="Group-2">
<path id="Oval-2" d="M578,359c0,-159.61 -129.39,-289 -289,-289c-159.61,0 -289,129.39 -289,289l578,0Z" style="fill:url(#_Linear1);fill-rule:nonzero;"></path>
<path id="Oval-2-Copy" d="M578,0c0,159.61 -129.39,289 -289,289c-159.61,0 -289,-129.39 -289,-289l578,0Z" style="fill:url(#_Linear2);fill-rule:nonzero;"></path>
</g>
<defs>
<linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.76961e-14,289,-289,1.76961e-14,289,70)">
<stop offset="0" style="stop-color:#610e0e;stop-opacity:1"></stop>
<stop offset="1" style="stop-color:#b21dd0;stop-opacity:0.61"></stop>
</linearGradient>
<linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-578,-7.07846e-14,7.07846e-14,-578,578,144.5)">
<stop offset="0" style="stop-color:#590e61;stop-opacity:0"></stop>
<stop offset="1" style="stop-color:#b21dd0;stop-opacity:1"></stop>
</linearGradient>
</defs>
</svg>
</div>
<div class="container">
<div class="row">
<div class="col-md-5">
<div class="hero-title text-left">
<?php if ($this->params->get('show_category_title', 1)) : ?>
<h1><?php echo $this->category->title; ?></h1>
<?php endif; ?>
<?php if ($this->params->get('show_page_heading')) : ?>
<h1><?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
<?php endif; ?>
<?php echo $afterDisplayTitle; ?>
<?php if ($this->params->get('show_cat_tags', 1) && !empty($this->category->tags->itemTags)) : ?>
<?php $this->category->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->category->tagLayout->render($this->category->tags->itemTags); ?>
<?php endif; ?>
</div>
<?php if ($beforeDisplayContent || $afterDisplayContent || $this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<div class="category-desc clearfix h4 font-weight-normal">
<?php echo $beforeDisplayContent; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo HTMLHelper::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
<?php endif; ?>
<?php echo $afterDisplayContent; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<div class="wrapperblog purplelight <?php echo $this->params->get('blog_class') ?>">
<?php if (empty($this->lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?>
<?php if ($this->params->get('show_no_articles', 1)) : ?>
<div class="container">
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_CONTENT_NO_ARTICLES'); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->children[$this->category->id]) : ?>
<div class="wrapper-subcategorie">
<?php foreach ($this->children[$this->category->id] as $kategorie) : ?>
<section class="py-5">
<div class="container">
<div class="title-section mb-5">
<h2 class="h4"><?php echo $kategorie->title; ?></h2>
</div>
<div class="row">
<?php $kategoriereset = 0; ?>
<?php if (!empty($this->intro_items)) : ?>
<?php foreach ($this->intro_items as $key => &$item) : ?>
<?php if ($item->catid !== $kategorie->id) {
continue;
} ?>
<div class="col-md-4 col-12 mb-4">
<?php
$this->item = & $item;
echo $this->loadTemplate('itemsottocategorie');
?>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
<div class="text-center pt-3">
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($kategorie->id, $kategorie->language)); ?>" class="text-underline small">Vedi tutti</a>
</div>
</div>
</section>
<?php endforeach; ?>
</div>
<?php elseif (!empty($this->intro_items)) : ?>
<section class="bg-white border-top border-bottom d-block d-lg-none">
<div class="container d-flex justify-content-between align-items-center py-3">
<h3 class="h6 text-uppercase mb-0 label-filter"><strong>Filtri</strong></h3>
<a class="toggle-filtri" href="#" aria-label="filtri" id="filtri-tipologia" title="Filtra per tipologia">
<svg class="icon icon-sm">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-funnel"></use>
</svg>
</a>
</div>
</section>
<section class="bg-gray-light">
<div class="container">
<div class="row">
<div class="tipologia-menu col-lg-3 bg-white bg-white-left">
<aside class="aside-list aside-sticky">
<div class="d-flex d-lg-none mb-3 align-items-center">
<a class="toggle-filtri pe-2" href="#" aria-label="chiudi filtri" id="back-filtri-tipologia" title="Chiudi i filtri per tipologia">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-arrow-left"></use>
</svg>
</a>
<p class="h6 mb-0 label-filter lh100"><strong>Filtri</strong></p>
</div>
<h2 class="h6 text-uppercase"><strong>Tipologia</strong></h2>
<?php
// Mostro le categorie che hanno la stessa categoria parent
$db = Factory::getContainer()->get('DatabaseDriver');
$query = $db->getQuery(true);
$query->select($db->quoteName(array('title', 'id','language')))
->from($db->quoteName('#__categories'))
->where($db->quoteName('parent_id') . ' = '. $this->category->parent_id)
->where($db->quoteName('extension') . ' = ' . $db->quote('com_content'));
$db->setQuery($query);
$rows = $db->loadObjectList();
?>
<ul class="">
<?php foreach ($rows as $row) : ?>
<div class="form-check my-0">
<li class="catsamelevel">
<input type="RADIO" value="<?php echo Route::_(RouteHelper::getCategoryRoute($row->id, $row->language)); ?>" onchange="window.open(this.value, '_self')" name="<?php echo $row->title; ?>" id="check-<?php echo $row->title; ?>" <?php echo ($catactive == $row->title) ? ('checked') :''; ?>>
<label class="mb-0" for="check-<?php echo $row->title; ?>"><?php echo $row->title; ?></label>
</li>
</div>
<?php endforeach ?>
</ul>
</aside>
</div>
<div class="col-lg-8 col-xl-7 offset-lg-1 pt84">
<?php foreach ($this->intro_items as $key => &$item) :
$this->item = & $item;
echo $this->loadTemplate('item');
endforeach; ?>
</div>
</div>
</div>
</div>
</section>
<?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', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-content-category-blog__navigation w-100">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="com-content-category-blog__counter counter float-end pt-3 pe-2">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
<div class="com-content-category-blog__pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>

View File

@ -0,0 +1,84 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2010 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
$lang = Factory::getLanguage();
$user = Factory::getUser();
$groups = $user->getAuthorisedViewLevels();
if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : ?>
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
<?php // Check whether category access level allows access to subcategories. ?>
<?php if (in_array($child->access, $groups)) : ?>
<?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) : ?>
<div class="com-content-category-blog__child">
<?php if ($lang->isRtl()) : ?>
<h3 class="page-header item-title">
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php else : ?>
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info">
<?php echo Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
<?php if ($child->description) : ?>
<div class="com-content-category-blog__description category-desc">
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<div class="com-content-category-blog__children collapse fade" id="category-<?php echo $child->id; ?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
echo $this->loadTemplate('children');
$this->category = $child->getParent();
$this->maxLevel++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif;

View File

@ -0,0 +1,94 @@
<?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\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;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<article class="card card-bg card-article card-article-purplelight">
<div class="card-body">
<div class="card-article-img d-none d-lg-block">
<?php if ($introimg->image_intro =='') {
?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php
} else {
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
}
?>
</div>
<div class="card-article-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_item_title_servizio', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?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; ?>
<p><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></p>
<?php if ($info == 1 || $info == 2) : ?>
<?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>
</div>
</article>

View File

@ -0,0 +1,87 @@
<?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\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;
use Joomla\CMS\Language\Text;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="card card-servizi card-bg card-icon rounded h-100">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" data-element="service-link">
<div class="card-body">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-flag"></use>
</svg>
<div class="card-icon-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_sottocategoria_item_title', $this->item); ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<small><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></small>
<?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>
</div>
</a>
</div>

View File

@ -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;
?>
<ol 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; ?>
</ol>

View File

@ -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\Layout\LayoutHelper;
?>
<div class="container">
<div class="com-content-category category-list">
<?php
$this->subtemplatename = 'articles';
echo LayoutHelper::render('joomla.content.category_default', $this);
?>
</div>
</div>

View File

@ -0,0 +1,349 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2009 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\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\AssociationHelper;
use Joomla\Component\Content\Site\Helper\RouteHelper;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_content.articles-list');
// Create some shortcuts.
$n = count($this->items);
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$langFilter = false;
// Tags filtering based on language filter
if (($this->params->get('filter_field') === 'tag') && (Multilanguage::isEnabled())) {
$tagfilter = ComponentHelper::getParams('com_tags')->get('tag_list_language_filter');
switch ($tagfilter) {
case 'current_language':
$langFilter = Factory::getApplication()->getLanguage()->getTag();
break;
case 'all':
$langFilter = false;
break;
default:
$langFilter = $tagfilter;
}
}
// Check for at least one editable article
$isEditable = false;
if (!empty($this->items)) {
foreach ($this->items as $article) {
if ($article->params->get('access-edit')) {
$isEditable = true;
break;
}
}
}
$currentDate = Factory::getDate()->format('Y-m-d H:i:s');
?>
<form action="<?php echo htmlspecialchars(Uri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm" class="com-content-category__articles mb-5">
<?php if ($this->params->get('filter_field') !== 'hide') : ?>
<div class="select-wrapper btn-group">
<?php if ($this->params->get('filter_field') === 'tag') : ?>
<span class="visually-hidden">
<label class="filter-search-lbl" for="filter-search">
<?php echo Text::_('JOPTION_SELECT_TAG'); ?>
</label>
</span>
<select name="filter_tag" id="filter-search" class="form-select" onchange="document.adminForm.submit();" >
<option value=""><?php echo Text::_('JOPTION_SELECT_TAG'); ?></option>
<?php echo HTMLHelper::_('select.options', HTMLHelper::_('tag.options', ['filter.published' => [1], 'filter.language' => $langFilter], true), 'value', 'text', $this->state->get('filter.tag')); ?>
</select>
<?php elseif ($this->params->get('filter_field') === 'month') : ?>
<span class="visually-hidden">
<label class="filter-search-lbl" for="filter-search">
<?php echo Text::_('JOPTION_SELECT_MONTH'); ?>
</label>
</span>
<select name="filter-search" id="filter-search" class="form-select" onchange="document.adminForm.submit();">
<option value=""><?php echo Text::_('JOPTION_SELECT_MONTH'); ?></option>
<?php echo HTMLHelper::_('select.options', HTMLHelper::_('content.months', $this->state), 'value', 'text', $this->state->get('list.filter')); ?>
</select>
<?php else : ?>
<label class="filter-search-lbl visually-hidden" for="filter-search">
<?php echo Text::_('COM_CONTENT_' . $this->params->get('filter_field') . '_FILTER_LABEL'); ?>
</label>
<input type="text" name="filter-search" id="filter-search" value="<?php echo $this->escape($this->state->get('list.filter')); ?>" class="inputbox" onchange="document.adminForm.submit();" placeholder="<?php echo Text::_('COM_CONTENT_' . $this->params->get('filter_field') . '_FILTER_LABEL'); ?>">
<?php endif; ?>
<?php if ($this->params->get('filter_field') !== 'tag' && $this->params->get('filter_field') !== 'month') : ?>
<button type="submit" name="filter_submit" class="btn btn-primary"><?php echo Text::_('JGLOBAL_FILTER_BUTTON'); ?></button>
<?php endif; ?>
<button type="reset" name="filter-clear-button" class="btn btn-secondary"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_pagination_limit')) : ?>
<div class="com-content-category__pagination btn-group select-wrapper float-end mb-3">
<label for="limit" class="visually-hidden">
<?php echo Text::_('JGLOBAL_DISPLAY_NUM'); ?>
</label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<?php endif; ?>
<?php if (empty($this->items)) : ?>
<?php if ($this->params->get('show_no_articles', 1)) : ?>
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_CONTENT_NO_ARTICLES'); ?>
</div>
<?php endif; ?>
<?php else : ?>
<table class="com-content-category__table category table table-striped table-hover">
<caption class="visually-hidden">
<?php echo Text::_('COM_CONTENT_ARTICLES_TABLE_CAPTION'); ?>
</caption>
<?php if ($this->params->get('show_headings')) : ?>
<thead>
<tr>
<th scope="col" id="categorylist_header_title">
<?php echo HTMLHelper::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder, null, 'asc', '', 'adminForm'); ?>
</th>
<?php if ($date = $this->params->get('list_show_date')) : ?>
<th scope="col" id="categorylist_header_date">
<?php if ($date === 'created') : ?>
<?php echo HTMLHelper::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.created', $listDirn, $listOrder); ?>
<?php elseif ($date === 'modified') : ?>
<?php echo HTMLHelper::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.modified', $listDirn, $listOrder); ?>
<?php elseif ($date === 'published') : ?>
<?php echo HTMLHelper::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.publish_up', $listDirn, $listOrder); ?>
<?php endif; ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('list_show_author')) : ?>
<th scope="col" id="categorylist_header_author">
<?php echo HTMLHelper::_('grid.sort', 'JAUTHOR', 'author', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('list_show_hits')) : ?>
<th scope="col" id="categorylist_header_hits">
<?php echo HTMLHelper::_('grid.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('list_show_votes', 0) && $this->vote) : ?>
<th scope="col" id="categorylist_header_votes">
<?php echo HTMLHelper::_('grid.sort', 'COM_CONTENT_VOTES', 'rating_count', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('list_show_ratings', 0) && $this->vote) : ?>
<th scope="col" id="categorylist_header_ratings">
<?php echo HTMLHelper::_('grid.sort', 'COM_CONTENT_RATINGS', 'rating', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($isEditable) : ?>
<th scope="col" id="categorylist_header_edit"><?php echo Text::_('COM_CONTENT_EDIT_ITEM'); ?></th>
<?php endif; ?>
</tr>
</thead>
<?php endif; ?>
<tbody>
<?php foreach ($this->items as $i => $article) : ?>
<?php if ($this->items[$i]->state == ContentComponent::CONDITION_UNPUBLISHED) : ?>
<tr class="system-unpublished cat-list-row<?php echo $i % 2; ?>">
<?php else : ?>
<tr class="cat-list-row<?php echo $i % 2; ?>" >
<?php endif; ?>
<th class="list-title" scope="row">
<?php if (in_array($article->access, $this->user->getAuthorisedViewLevels())) : ?>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($article->slug, $article->catid, $article->language)); ?>" title="<?php echo $this->escape($article->title); ?>">
<?php echo $this->escape($article->title); ?>
</a>
<?php if (Associations::isEnabled() && $this->params->get('show_associations')) : ?>
<div class="cat-list-association">
<?php $associations = AssociationHelper::displayAssociations($article->id); ?>
<?php foreach ($associations as $association) : ?>
<?php if ($this->params->get('flags', 1) && $association['language']->image) : ?>
<?php $flag = HTMLHelper::_('image', 'mod_languages/' . $association['language']->image . '.gif', $association['language']->title_native, ['title' => $association['language']->title_native], true); ?>
<a href="<?php echo Route::_($association['item']); ?>"><?php echo $flag; ?></a>
<?php else : ?>
<?php $class = 'btn btn-secondary btn-sm btn-' . strtolower($association['language']->lang_code); ?>
<a class="<?php echo $class; ?>" title="<?php echo $association['language']->title_native; ?>" href="<?php echo Route::_($association['item']); ?>"><?php echo $association['language']->lang_code; ?>
<span class="visually-hidden"><?php echo $association['language']->title_native; ?></span>
</a>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php else : ?>
<?php
echo $this->escape($article->title) . ' : ';
$itemId = Factory::getApplication()->getMenu()->getActive()->id;
$link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false));
$link->setVar('return', base64_encode(RouteHelper::getArticleRoute($article->slug, $article->catid, $article->language)));
?>
<a href="<?php echo $link; ?>" class="register">
<?php echo Text::_('COM_CONTENT_REGISTER_TO_READ_MORE'); ?>
</a>
<?php if (Associations::isEnabled() && $this->params->get('show_associations')) : ?>
<div class="cat-list-association">
<?php $associations = AssociationHelper::displayAssociations($article->id); ?>
<?php foreach ($associations as $association) : ?>
<?php if ($this->params->get('flags', 1)) : ?>
<?php $flag = HTMLHelper::_('image', 'mod_languages/' . $association['language']->image . '.gif', $association['language']->title_native, ['title' => $association['language']->title_native], true); ?>
<a href="<?php echo Route::_($association['item']); ?>"><?php echo $flag; ?></a>
<?php else : ?>
<?php $class = 'btn btn-secondary btn-sm btn-' . strtolower($association['language']->lang_code); ?>
<a class="<?php echo $class; ?>" title="<?php echo $association['language']->title_native; ?>" href="<?php echo Route::_($association['item']); ?>"><?php echo $association['language']->lang_code; ?>
<span class="visually-hidden"><?php echo $association['language']->title_native; ?></span>
</a>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($article->state == ContentComponent::CONDITION_UNPUBLISHED) : ?>
<div>
<span class="list-published badge bg-warning text-light">
<?php echo Text::_('JUNPUBLISHED'); ?>
</span>
</div>
<?php endif; ?>
<?php if ($article->publish_up > $currentDate) : ?>
<div>
<span class="list-published badge bg-warning text-light">
<?php echo Text::_('JNOTPUBLISHEDYET'); ?>
</span>
</div>
<?php endif; ?>
<?php if (!is_null($article->publish_down) && $article->publish_down < $currentDate) : ?>
<div>
<span class="list-published badge bg-warning text-light">
<?php echo Text::_('JEXPIRED'); ?>
</span>
</div>
<?php endif; ?>
</th>
<?php if ($this->params->get('list_show_date')) : ?>
<td class="list-date small">
<?php
echo HTMLHelper::_(
'date',
$article->displayDate,
$this->escape($this->params->get('date_format', Text::_('DATE_FORMAT_LC3')))
); ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('list_show_author', 1)) : ?>
<td class="list-author">
<?php if (!empty($article->author) || !empty($article->created_by_alias)) : ?>
<?php $author = $article->author ?>
<?php $author = $article->created_by_alias ?: $author; ?>
<?php if (!empty($article->contact_link) && $this->params->get('link_author') == true) : ?>
<?php if ($this->params->get('show_headings')) : ?>
<?php echo HTMLHelper::_('link', $article->contact_link, $author); ?>
<?php else : ?>
<?php echo Text::sprintf('COM_CONTENT_WRITTEN_BY', HTMLHelper::_('link', $article->contact_link, $author)); ?>
<?php endif; ?>
<?php else : ?>
<?php if ($this->params->get('show_headings')) : ?>
<?php echo $author; ?>
<?php else : ?>
<?php echo Text::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('list_show_hits', 1)) : ?>
<td class="list-hits">
<span class="badge bg-primary">
<?php if ($this->params->get('show_headings')) : ?>
<?php echo $article->hits; ?>
<?php else : ?>
<?php echo Text::sprintf('JGLOBAL_HITS_COUNT', $article->hits); ?>
<?php endif; ?>
</span>
</td>
<?php endif; ?>
<?php if ($this->params->get('list_show_votes', 0) && $this->vote) : ?>
<td class="list-votes">
<span class="badge bg-success">
<?php if ($this->params->get('show_headings')) : ?>
<?php echo $article->rating_count; ?>
<?php else : ?>
<?php echo Text::sprintf('COM_CONTENT_VOTES_COUNT', $article->rating_count); ?>
<?php endif; ?>
</span>
</td>
<?php endif; ?>
<?php if ($this->params->get('list_show_ratings', 0) && $this->vote) : ?>
<td class="list-ratings">
<span class="badge bg-warning text-light">
<?php if ($this->params->get('show_headings')) : ?>
<?php echo $article->rating; ?>
<?php else : ?>
<?php echo Text::sprintf('COM_CONTENT_RATINGS_COUNT', $article->rating); ?>
<?php endif; ?>
</span>
</td>
<?php endif; ?>
<?php if ($isEditable) : ?>
<td class="list-edit">
<?php if ($article->params->get('access-edit')) : ?>
<?php echo HTMLHelper::_('contenticon.edit', $article, $article->params); ?>
<?php endif; ?>
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php // Code to add a link to submit an article. ?>
<?php if ($this->category->getParams()->get('access-create')) : ?>
<?php echo HTMLHelper::_('contenticon.create', $this->category, $this->category->params); ?>
<?php endif; ?>
<?php // Add pagination links ?>
<?php if (!empty($this->items)) : ?>
<?php if (($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-content-category__navigation w-100">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="com-content-category__counter counter float-end pt-3 pe-2">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
<div class="com-content-category__pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<div>
<input type="hidden" name="filter_order" value="">
<input type="hidden" name="filter_order_Dir" value="">
<input type="hidden" name="limitstart" value="">
<input type="hidden" name="task" value="">
</div>
</form>

View File

@ -0,0 +1,83 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2009 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
$lang = Factory::getLanguage();
$user = Factory::getUser();
$groups = $user->getAuthorisedViewLevels();
?>
<?php if (count($this->children[$this->category->id]) > 0) : ?>
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
<?php // Check whether category access level allows access to subcategories. ?>
<?php if (in_array($child->access, $groups)) : ?>
<?php if ($this->params->get('show_empty_categories') || $child->getNumItems(true) || count($child->getChildren())) : ?>
<div class="com-content-category__children">
<?php if ($lang->isRtl()) : ?>
<h3 class="page-header item-title">
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip hasTooltip" title="<?php echo HTMLHelper::_('tooltipText', 'COM_CONTENT_NUM_ITEMS'); ?>">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if (count($child->getChildren()) > 0 && $this->maxLevel > 1) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php else : ?>
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip hasTooltip" title="<?php echo HTMLHelper::_('tooltipText', 'COM_CONTENT_NUM_ITEMS'); ?>">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if (count($child->getChildren()) > 0 && $this->maxLevel > 1) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
<?php if ($child->description) : ?>
<div class="category-desc">
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (count($child->getChildren()) > 0 && $this->maxLevel > 1) : ?>
<div class="collapse fade" id="category-<?php echo $child->id; ?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
echo $this->loadTemplate('children');
$this->category = $child->getParent();
$this->maxLevel++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -0,0 +1,236 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
use Joomla\CMS\Uri\Uri;
$url = Uri::root();
$app = Factory::getApplication();
$this->category->text = $this->category->description;
$app->triggerEvent('onContentPrepare', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$this->category->description = $this->category->text;
$results = $app->triggerEvent('onContentAfterTitle', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayTitle = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentBeforeDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$beforeDisplayContent = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentAfterDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayContent = trim(implode("\n", $results));
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
//echo json_encode($this->category);
//echo $this->category->parent_id;
$catactive = $this->category->title;
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="blog-didattica" itemscope itemtype="https://schema.org/Blog">
<?php if ($this->params->get('show_category_title', 1)) : ?>
<section class="section bg-bluelectric bg-bluelectricgradient py-5 position-relative d-flex align-items-center overflow-hidden">
<div class="green-square-forms">
<svg width="100%" height="100%" viewBox="0 0 726 360" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Group" opacity="0.32"><path id="Rectangle" d="M627.751,245.625l-396.368,-193.321l-193.322,396.368l396.368,193.321l193.322,-396.368Z" style="fill:url(#_Linear1);"></path><path id="Rectangle1" serif:id="Rectangle" d="M583.359,-179.506l-264.865,159.147l159.147,264.865l264.865,-159.147l-159.147,-264.865Z" style="fill:url(#_Linear2);"></path><path id="Rectangle2" serif:id="Rectangle" d="M210.182,-54.565l-213.341,33.79l33.79,213.34l213.341,-33.79l-33.79,-213.34Z" style="fill:url(#_Linear3);"></path></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(203.046,589.69,-589.69,203.046,231.383,52.3035)"><stop offset="0" style="stop-color:#0f842e;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(344.438,-26.7144,26.7144,344.438,398.068,112.073)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(230.236,72.8805,-72.8805,230.236,13.7359,85.8949)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient></defs>
</svg>
</div>
<div class="container">
<div class="row">
<div class="col-md-5">
<div class="hero-title text-left">
<h1><?php echo $this->category->title; ?></h1>
<?php if ($this->params->get('show_page_heading')) : ?>
<h1><?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
<?php endif; ?>
<?php echo $afterDisplayTitle; ?>
<?php if ($this->params->get('show_cat_tags', 1) && !empty($this->category->tags->itemTags)) : ?>
<?php $this->category->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->category->tagLayout->render($this->category->tags->itemTags); ?>
<?php endif; ?>
</div>
<?php if ($beforeDisplayContent || $afterDisplayContent || $this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<div class="category-desc clearfix h4 font-weight-normal">
<?php echo $beforeDisplayContent; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo HTMLHelper::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
<?php endif; ?>
<?php echo $afterDisplayContent; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<?php endif; ?>
<div class="wrapperblog redbrown <?php echo $this->params->get('blog_class') ?>">
<?php if (empty($this->lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?>
<?php if ($this->params->get('show_no_articles', 1)) : ?>
<div class="container">
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_CONTENT_NO_ARTICLES'); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->children[$this->category->id]) : ?>
<div class="wrapperblog">
<section class="bg-white border-top border-bottom d-block d-lg-none">
<div class="container d-flex justify-content-between align-items-center py-3">
<h3 class="h6 text-uppercase mb-0 label-filter"><strong>Filtri</strong></h3>
<a class="toggle-filtri" href="#" aria-label="filtri" id="filtri-tipologia" title="Filtra per tipologia">
<svg class="icon icon-sm">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-funnel"></use>
</svg>
</a>
</div>
</section>
<section class="bg-gray-light">
<div class="container">
<div class="row">
<div class="tipologia-menu col-lg-3 bg-white bg-white-left">
<aside class="aside-list aside-sticky">
<div class="d-flex d-lg-none mb-3 align-items-center">
<a class="toggle-filtri pe-2" href="#" aria-label="chiudi filtri" id="back-filtri-tipologia" title="Chiudi i filtri per tipologia">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-arrow-left"></use>
</svg>
</a>
<p class="h6 mb-0 label-filter lh100"><strong>Filtri</strong></p>
</div>
<h2 class="h6 text-uppercase"><strong>Tipologia</strong></h2>
<ul class="">
<?php foreach ($this->children[$this->category->id] as $kategorie) : ?>
<div class="form-check my-0">
<li class="catsamelevel">
<input type="RADIO" value="<?php echo Route::_(RouteHelper::getCategoryRoute($kategorie->id, $kategorie->language)); ?>" onchange="window.open(this.value, '_self')" name="<?php echo $kategorie->title; ?>" id="check-<?php echo $kategorie->title; ?>" <?php echo ($catactive == $kategorie->title) ? ('checked') :''; ?>>
<label class="mb-0" for="check-<?php echo $kategorie->title; ?>"><?php echo $kategorie->title; ?></label>
</li>
</div>
<?php endforeach ?>
</ul>
</aside>
</div>
<div class="col-lg-8 col-xl-7 offset-lg-1 pt84">
<?php foreach ($this->children[$this->category->id] as $kategorie) : ?>
<?php if (!empty($this->intro_items)) : ?>
<?php foreach ($this->intro_items as $key => &$item) :
if ($item->catid !== $kategorie->id) {
continue;
}
$this->item = & $item;
echo $this->loadTemplate('item');
endforeach; ?>
<?php endif; ?>
<?php endforeach ?>
</div>
</div>
</section>
</div>
<?php elseif (!empty($this->intro_items)) : ?>
<section class="bg-white border-top border-bottom d-block d-lg-none">
<div class="container d-flex justify-content-between align-items-center py-3">
<h3 class="h6 text-uppercase mb-0 label-filter"><strong>Filtri</strong></h3>
<a class="toggle-filtri" href="#" aria-label="filtri" id="filtri-tipologia" title="Filtra per tipologia">
<svg class="icon icon-sm">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-funnel"></use>
</svg>
</a>
</div>
</section>
<section class="bg-gray-light">
<div class="container">
<div class="row">
<div class="tipologia-menu col-lg-3 bg-white bg-white-left">
<aside class="aside-list aside-sticky">
<div class="d-flex d-lg-none mb-3 align-items-center">
<a class="toggle-filtri pe-2" href="#" aria-label="chiudi filtri" id="back-filtri-tipologia" title="Chiudi i filtri per tipologia">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-arrow-left"></use>
</svg>
</a>
<p class="h6 mb-0 label-filter lh100"><strong>Filtri</strong></p>
</div>
<h2 class="h6 text-uppercase"><strong>Tipologia</strong></h2>
<?php
// Mostro le categorie che hanno la stessa categoria parent
$db = Factory::getContainer()->get('DatabaseDriver');
$query = $db->getQuery(true);
$query->select($db->quoteName(array('title', 'id','language')))
->from($db->quoteName('#__categories'))
->where($db->quoteName('parent_id') . ' = '. $this->category->parent_id)
->where($db->quoteName('extension') . ' = ' . $db->quote('com_content'));
$db->setQuery($query);
$rows = $db->loadObjectList();
?>
<ul class="">
<?php foreach ($rows as $row) : ?>
<div class="form-check my-0">
<li class="catsamelevel">
<input type="RADIO" value="<?php echo Route::_(RouteHelper::getCategoryRoute($row->id, $row->language)); ?>" onchange="window.open(this.value, '_self')" name="<?php echo $row->title; ?>" id="check-<?php echo $row->title; ?>" <?php echo ($catactive == $row->title) ? ('checked') :''; ?>>
<label class="mb-0" for="check-<?php echo $row->title; ?>"><?php echo $row->title; ?></label>
</li>
</div>
<?php endforeach ?>
</ul>
</aside>
</div>
<div class="col-lg-8 col-xl-7 offset-lg-1 pt84">
<?php foreach ($this->intro_items as $key => &$item) :
$this->item = & $item;
echo $this->loadTemplate('item');
endforeach; ?>
</div>
</div>
</div>
</div>
</section>
<?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', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-content-category-blog__navigation w-100">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="com-content-category-blog__counter counter float-end pt-3 pe-2">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
<div class="com-content-category-blog__pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>

View File

@ -0,0 +1,698 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="Blog per le categorie della sezione Didattica" option="didattica">
<help key = "Menu_Item:_Category_Blog" />
<message>
<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
</message>
</layout>
<!-- Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldprefix="Joomla\Component\Categories\Administrator\Field"
>
<field
name="id"
type="modal_category"
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
extension="com_content"
required="true"
select="true"
new="true"
edit="true"
clear="true"
/>
<field
name="filter_tag"
type="tag"
label="JTAG"
multiple="true"
mode="nested"
custom="deny"
/>
</fieldset>
</fields>
<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
<fieldset name="basic" label="JGLOBAL_CATEGORY_OPTIONS">
<field
name="layout_type"
type="hidden"
default="blog"
/>
<field
name="show_category_title"
type="list"
label="JGLOBAL_SHOW_CATEGORY_TITLE"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description"
type="list"
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description_image"
type="list"
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="maxLevel"
type="list"
label="JGLOBAL_MAXLEVEL_LABEL"
description="JGLOBAL_MAXLEVEL_DESC"
useglobal="true"
validate="options"
>
<option value="-1">JALL</option>
<option value="0">JNONE</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="show_empty_categories"
type="list"
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_no_articles"
type="list"
label="COM_CONTENT_NO_ARTICLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category_heading_title_text"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_HEADING"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_subcat_desc"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_num_articles"
type="list"
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="advanced" label="JGLOBAL_BLOG_LAYOUT_OPTIONS" description="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL">
<field
name="num_leading_articles"
type="number"
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class_leading"
type="text"
label="JGLOBAL_BLOG_CLASS_LEADING"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_intro_articles"
type="number"
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class"
type="text"
label="JGLOBAL_BLOG_CLASS"
description="JGLOBAL_BLOG_CLASS_NOTE_DESC"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_columns"
type="number"
label="JGLOBAL_NUM_COLUMNS_LABEL"
filter="integer"
parentclass="stack span-1-inline"
useglobal="true"
/>
<field
name="multi_column_order"
type="list"
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
parentclass="stack span-2-inline"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_BLOG_DOWN_OPTION</option>
<option value="1">JGLOBAL_BLOG_ACROSS_OPTION</option>
</field>
<field
name="num_links"
type="number"
label="JGLOBAL_NUM_LINKS_LABEL"
filter="integer"
parentclass="stack span-1"
useglobal="true"
/>
<field
name="show_featured"
type="list"
label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="show">JSHOW</option>
<option value="hide">JHIDE</option>
<option value="only">JONLY</option>
</field>
<field
name="link_intro_image"
type="list"
label="JGLOBAL_LINKED_INTRO_IMAGE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_subcategory_content"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNONE</option>
<option value="-1">JALL</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="orderby_pri"
type="list"
label="JGLOBAL_CATEGORY_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2"
>
<option value="none">JGLOBAL_NO_ORDER</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
</field>
<field
name="orderby_sec"
type="list"
label="JGLOBAL_ARTICLE_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="front">COM_CONTENT_FEATURED_ORDER</option>
<option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
<option value="date">JGLOBAL_OLDEST_FIRST</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
<option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
<option value="hits" requires="hits">JGLOBAL_MOST_HITS</option>
<option value="rhits" requires="hits">JGLOBAL_LEAST_HITS</option>
<option value="random">JGLOBAL_RANDOM_ORDER</option>
<option value="order">JGLOBAL_ORDERING</option>
<option value="rorder">JGLOBAL_REVERSE_ORDERING</option>
<option value="vote" requires="vote">JGLOBAL_VOTES_DESC</option>
<option value="rvote" requires="vote">JGLOBAL_VOTES_ASC</option>
<option value="rank" requires="vote">JGLOBAL_RATINGS_DESC</option>
<option value="rrank" requires="vote">JGLOBAL_RATINGS_ASC</option>
</field>
<field
name="order_date"
type="list"
label="JGLOBAL_ORDERING_DATE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="created">JGLOBAL_CREATED</option>
<option value="modified">JGLOBAL_MODIFIED</option>
<option value="published">JPUBLISHED</option>
<option value="unpublished">JUNPUBLISHED</option>
</field>
<field
name="show_pagination"
type="list"
label="JGLOBAL_PAGINATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
<option value="2">JGLOBAL_AUTO</option>
</field>
<field
name="show_pagination_results"
type="list"
label="JGLOBAL_PAGINATION_RESULTS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
addfieldprefix="Joomla\Component\Content\Administrator\Field"
>
<field
name="article_layout"
type="componentlayout"
label="JGLOBAL_FIELD_LAYOUT_LABEL"
description="JGLOBAL_FIELD_LAYOUT_DESC"
class="form-select"
menuitems="true"
extension="com_content"
view="article"
/>
<field
name="show_title"
type="list"
label="JGLOBAL_SHOW_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_titles"
type="list"
label="JGLOBAL_LINKED_TITLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_intro"
type="list"
label="JGLOBAL_SHOW_INTRO_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="info_block_position"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
</field>
<field
name="info_block_show_title"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_category"
type="list"
label="JGLOBAL_LINK_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_parent_category"
type="list"
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_parent_category"
type="list"
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_associations"
type="assoc"
label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
useglobal="true"
class="form-select-color-state"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_author"
type="list"
label="JGLOBAL_SHOW_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_author"
type="list"
label="JGLOBAL_LINK_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_create_date"
type="list"
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_modify_date"
type="list"
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_publish_date"
type="list"
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_item_navigation"
type="list"
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_vote"
type="votelist"
label="JGLOBAL_SHOW_VOTE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore"
type="list"
label="JGLOBAL_SHOW_READMORE_LABEL"
description="JGLOBAL_SHOW_READMORE_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore_title"
type="list"
label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_hits"
type="list"
label="JGLOBAL_SHOW_HITS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_noauth"
type="list"
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
<fieldset name="integration" label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
<field
name="show_feed_link"
type="list"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="feed_summary"
type="list"
label="JGLOBAL_FEED_SUMMARY_LABEL"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_INTRO_TEXT</option>
<option value="1">JGLOBAL_FULL_TEXT</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,84 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2010 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
$lang = Factory::getLanguage();
$user = Factory::getUser();
$groups = $user->getAuthorisedViewLevels();
if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : ?>
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
<?php // Check whether category access level allows access to subcategories. ?>
<?php if (in_array($child->access, $groups)) : ?>
<?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) : ?>
<div class="com-content-category-blog__child">
<?php if ($lang->isRtl()) : ?>
<h3 class="page-header item-title">
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php else : ?>
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info">
<?php echo Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
<?php if ($child->description) : ?>
<div class="com-content-category-blog__description category-desc">
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<div class="com-content-category-blog__children collapse fade" id="category-<?php echo $child->id; ?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
echo $this->loadTemplate('children');
$this->category = $child->getParent();
$this->maxLevel++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif;

View File

@ -0,0 +1,88 @@
<?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\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;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<article class="card card-bg card-article card-article-bluelectric">
<div class="card-body">
<div class="card-article-img d-none d-lg-block">
<?php if($introimg->image_intro ==''){ ?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid"/></a></figure>
<?php } else{
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
}
?>
</div>
<div class="card-article-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_item_title_servizio', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<p><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></p>
<?php if ($info == 1 || $info == 2) : ?>
<?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>
</div>
</article>

View File

@ -0,0 +1,87 @@
<?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\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;
use Joomla\CMS\Language\Text;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="card card-servizi card-bg card-icon rounded h-100">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" data-element="service-link">
<div class="card-body">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-map-marker"></use>
</svg>
<div class="card-icon-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_sottocategoria_item_title', $this->item); ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<small><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></small>
<?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>
</div>
</a>
</div>

View File

@ -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;
?>
<ol 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; ?>
</ol>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,698 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="Blog per le categorie della sezione documenti della scuola" option="documenti">
<help key = "Menu_Item:_Category_Blog" />
<message>
<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
</message>
</layout>
<!-- Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldprefix="Joomla\Component\Categories\Administrator\Field"
>
<field
name="id"
type="modal_category"
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
extension="com_content"
required="true"
select="true"
new="true"
edit="true"
clear="true"
/>
<field
name="filter_tag"
type="tag"
label="JTAG"
multiple="true"
mode="nested"
custom="deny"
/>
</fieldset>
</fields>
<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
<fieldset name="basic" label="JGLOBAL_CATEGORY_OPTIONS">
<field
name="layout_type"
type="hidden"
default="blog"
/>
<field
name="show_category_title"
type="list"
label="JGLOBAL_SHOW_CATEGORY_TITLE"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description"
type="list"
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description_image"
type="list"
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="maxLevel"
type="list"
label="JGLOBAL_MAXLEVEL_LABEL"
description="JGLOBAL_MAXLEVEL_DESC"
useglobal="true"
validate="options"
>
<option value="-1">JALL</option>
<option value="0">JNONE</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="show_empty_categories"
type="list"
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_no_articles"
type="list"
label="COM_CONTENT_NO_ARTICLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category_heading_title_text"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_HEADING"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_subcat_desc"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_num_articles"
type="list"
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="advanced" label="JGLOBAL_BLOG_LAYOUT_OPTIONS" description="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL">
<field
name="num_leading_articles"
type="number"
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class_leading"
type="text"
label="JGLOBAL_BLOG_CLASS_LEADING"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_intro_articles"
type="number"
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class"
type="text"
label="JGLOBAL_BLOG_CLASS"
description="JGLOBAL_BLOG_CLASS_NOTE_DESC"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_columns"
type="number"
label="JGLOBAL_NUM_COLUMNS_LABEL"
filter="integer"
parentclass="stack span-1-inline"
useglobal="true"
/>
<field
name="multi_column_order"
type="list"
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
parentclass="stack span-2-inline"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_BLOG_DOWN_OPTION</option>
<option value="1">JGLOBAL_BLOG_ACROSS_OPTION</option>
</field>
<field
name="num_links"
type="number"
label="JGLOBAL_NUM_LINKS_LABEL"
filter="integer"
parentclass="stack span-1"
useglobal="true"
/>
<field
name="show_featured"
type="list"
label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="show">JSHOW</option>
<option value="hide">JHIDE</option>
<option value="only">JONLY</option>
</field>
<field
name="link_intro_image"
type="list"
label="JGLOBAL_LINKED_INTRO_IMAGE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_subcategory_content"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNONE</option>
<option value="-1">JALL</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="orderby_pri"
type="list"
label="JGLOBAL_CATEGORY_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2"
>
<option value="none">JGLOBAL_NO_ORDER</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
</field>
<field
name="orderby_sec"
type="list"
label="JGLOBAL_ARTICLE_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="front">COM_CONTENT_FEATURED_ORDER</option>
<option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
<option value="date">JGLOBAL_OLDEST_FIRST</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
<option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
<option value="hits" requires="hits">JGLOBAL_MOST_HITS</option>
<option value="rhits" requires="hits">JGLOBAL_LEAST_HITS</option>
<option value="random">JGLOBAL_RANDOM_ORDER</option>
<option value="order">JGLOBAL_ORDERING</option>
<option value="rorder">JGLOBAL_REVERSE_ORDERING</option>
<option value="vote" requires="vote">JGLOBAL_VOTES_DESC</option>
<option value="rvote" requires="vote">JGLOBAL_VOTES_ASC</option>
<option value="rank" requires="vote">JGLOBAL_RATINGS_DESC</option>
<option value="rrank" requires="vote">JGLOBAL_RATINGS_ASC</option>
</field>
<field
name="order_date"
type="list"
label="JGLOBAL_ORDERING_DATE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="created">JGLOBAL_CREATED</option>
<option value="modified">JGLOBAL_MODIFIED</option>
<option value="published">JPUBLISHED</option>
<option value="unpublished">JUNPUBLISHED</option>
</field>
<field
name="show_pagination"
type="list"
label="JGLOBAL_PAGINATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
<option value="2">JGLOBAL_AUTO</option>
</field>
<field
name="show_pagination_results"
type="list"
label="JGLOBAL_PAGINATION_RESULTS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
addfieldprefix="Joomla\Component\Content\Administrator\Field"
>
<field
name="article_layout"
type="componentlayout"
label="JGLOBAL_FIELD_LAYOUT_LABEL"
description="JGLOBAL_FIELD_LAYOUT_DESC"
class="form-select"
menuitems="true"
extension="com_content"
view="article"
/>
<field
name="show_title"
type="list"
label="JGLOBAL_SHOW_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_titles"
type="list"
label="JGLOBAL_LINKED_TITLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_intro"
type="list"
label="JGLOBAL_SHOW_INTRO_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="info_block_position"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
</field>
<field
name="info_block_show_title"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_category"
type="list"
label="JGLOBAL_LINK_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_parent_category"
type="list"
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_parent_category"
type="list"
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_associations"
type="assoc"
label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
useglobal="true"
class="form-select-color-state"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_author"
type="list"
label="JGLOBAL_SHOW_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_author"
type="list"
label="JGLOBAL_LINK_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_create_date"
type="list"
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_modify_date"
type="list"
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_publish_date"
type="list"
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_item_navigation"
type="list"
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_vote"
type="votelist"
label="JGLOBAL_SHOW_VOTE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore"
type="list"
label="JGLOBAL_SHOW_READMORE_LABEL"
description="JGLOBAL_SHOW_READMORE_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore_title"
type="list"
label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_hits"
type="list"
label="JGLOBAL_SHOW_HITS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_noauth"
type="list"
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
<fieldset name="integration" label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
<field
name="show_feed_link"
type="list"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="feed_summary"
type="list"
label="JGLOBAL_FEED_SUMMARY_LABEL"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_INTRO_TEXT</option>
<option value="1">JGLOBAL_FULL_TEXT</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,84 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2010 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
$lang = Factory::getLanguage();
$user = Factory::getUser();
$groups = $user->getAuthorisedViewLevels();
if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : ?>
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
<?php // Check whether category access level allows access to subcategories. ?>
<?php if (in_array($child->access, $groups)) : ?>
<?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) : ?>
<div class="com-content-category-blog__child">
<?php if ($lang->isRtl()) : ?>
<h3 class="page-header item-title">
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php else : ?>
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info">
<?php echo Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
<?php if ($child->description) : ?>
<div class="com-content-category-blog__description category-desc">
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<div class="com-content-category-blog__children collapse fade" id="category-<?php echo $child->id; ?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
echo $this->loadTemplate('children');
$this->category = $child->getParent();
$this->maxLevel++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif;

View File

@ -0,0 +1,90 @@
<?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\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;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<article class="card card-bg card-article card-article-redbrown">
<div class="card-body">
<div class="card-article-img d-none d-lg-block">
<?php if($introimg->image_intro ==''){ ?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?=$baseImagePath?>imgsegnaposto.jpg" class="img-fluid"/></a></figure>
<?php } else{
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
}
?>
</div>
<div class="card-article-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_item_title_servizio', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?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; ?>
<p><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></p>
<?php if ($info == 1 || $info == 2) : ?>
<?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>
</div>
</article>

View File

@ -0,0 +1,87 @@
<?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\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;
use Joomla\CMS\Language\Text;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="card card-servizi card-bg card-icon rounded h-100">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" data-element="service-link">
<div class="card-body">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-files"></use>
</svg>
<div class="card-icon-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_sottocategoria_item_title', $this->item); ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<small><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></small>
<?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>
</div>
</a>
</div>

View File

@ -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;
?>
<ol 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; ?>
</ol>

View File

@ -0,0 +1,244 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
use Joomla\CMS\Uri\Uri;
$url = Uri::root();
$app = Factory::getApplication();
$this->category->text = $this->category->description;
$app->triggerEvent('onContentPrepare', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$this->category->description = $this->category->text;
$results = $app->triggerEvent('onContentAfterTitle', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayTitle = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentBeforeDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$beforeDisplayContent = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentAfterDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayContent = trim(implode("\n", $results));
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
//echo json_encode($this->category);
//echo $this->category->parent_id;
$catactive = $this->category->title;
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="blogj4a blog-category" itemscope itemtype="https://schema.org/Blog">
<section class="section bg-greendark bg-greendarkgradient py-5 position-relative d-flex align-items-center overflow-hidden">
<div class="green-square-forms">
<svg width="100%" height="100%" viewBox="0 0 726 360" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Group" opacity="0.32"><path id="Rectangle" d="M627.751,245.625l-396.368,-193.321l-193.322,396.368l396.368,193.321l193.322,-396.368Z" style="fill:url(#_Linear1);"></path><path id="Rectangle1" serif:id="Rectangle" d="M583.359,-179.506l-264.865,159.147l159.147,264.865l264.865,-159.147l-159.147,-264.865Z" style="fill:url(#_Linear2);"></path><path id="Rectangle2" serif:id="Rectangle" d="M210.182,-54.565l-213.341,33.79l33.79,213.34l213.341,-33.79l-33.79,-213.34Z" style="fill:url(#_Linear3);"></path></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(203.046,589.69,-589.69,203.046,231.383,52.3035)"><stop offset="0" style="stop-color:#0f842e;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(344.438,-26.7144,26.7144,344.438,398.068,112.073)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(230.236,72.8805,-72.8805,230.236,13.7359,85.8949)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient></defs>
</svg>
</div>
<div class="container">
<div class="row">
<div class="col-md-5">
<div class="hero-title text-left">
<?php if ($this->params->get('show_category_title', 1)) : ?>
<h1><?php echo $this->category->title; ?></h1>
<?php endif; ?>
<?php if ($this->params->get('show_page_heading')) : ?>
<h1><?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
<?php endif; ?>
<?php echo $afterDisplayTitle; ?>
<?php if ($this->params->get('show_cat_tags', 1) && !empty($this->category->tags->itemTags)) : ?>
<?php $this->category->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->category->tagLayout->render($this->category->tags->itemTags); ?>
<?php endif; ?>
</div>
<?php if ($beforeDisplayContent || $afterDisplayContent || $this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<div class="category-desc clearfix h4 font-weight-normal">
<?php echo $beforeDisplayContent; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo HTMLHelper::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
<?php endif; ?>
<?php echo $afterDisplayContent; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<div class="wrapperblog redbrown <?php echo $this->params->get('blog_class') ?>">
<?php if (empty($this->lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?>
<?php if ($this->params->get('show_no_articles', 1)) : ?>
<div class="container">
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_CONTENT_NO_ARTICLES'); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->children[$this->category->id]) : ?>
<div class="wrapper-subcategorie">
<?php foreach ($this->children[$this->category->id] as $kategorie) : ?>
<section class="py-5">
<div class="container">
<div class="title-section ms-3 mb-2">
<h2 class="h4"><?php echo $kategorie->title; ?></h2>
</div>
<div class="row">
<?php $kategoriereset = 0; ?>
<?php if (!empty($this->intro_items)) : ?>
<?php if ($kategorie->title == "Notizie") {?>
<div class="col-12">
<div class="owl-carousel owl-theme carousel-theme" id="carosellonotizie">
<?php foreach ($this->intro_items as $key => &$item) :
if ($item->catid !== $kategorie->id) {
continue;
}
$this->item = & $item;
echo $this->loadTemplate('itemsottocategorie');
endforeach; ?>
</div>
</div>
<?php } elseif ($kategorie->title == "Circolari") { ?>
<div class="col-12">
<div class="owl-carousel owl-theme carousel-theme" id="carosellocircolari">
<?php foreach ($this->intro_items as $key => &$item) :
if ($item->catid !== $kategorie->id) {
continue;
} ?>
<?php
$this->item = & $item;
echo $this->loadTemplate('itemsottocategorienoimg'); ?>
<?php
endforeach; ?>
</div>
</div>
<?php } elseif ($kategorie->title == "Eventi") { ?>
<div class="col-12">
<div class="owl-carousel owl-theme carousel-theme" id="caroselloeventi">
<?php foreach ($this->intro_items as $key => &$item) :
if ($item->catid !== $kategorie->id) {
continue;
} ?>
<?php
$this->item = & $item;
echo $this->loadTemplate('itemsottocategorienoimg'); ?>
<?php
endforeach; ?>
</div>
</div>
<?php } ?>
<?php endif; ?>
</div>
<div class="text-center pt-3">
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($kategorie->id, $kategorie->language)); ?>" class="text-underline small">Vedi tutti</a>
</div>
</div>
</section>
<?php endforeach; ?>
</div>
<?php elseif (!empty($this->intro_items)) : ?>
<section class="bg-white border-top border-bottom d-block d-lg-none">
<div class="container d-flex justify-content-between align-items-center py-3">
<h3 class="h6 text-uppercase mb-0 label-filter"><strong>Filtri</strong></h3>
<a class="toggle-filtri" href="#" aria-label="filtri" id="filtri-tipologia" title="Filtra per tipologia">
<svg class="icon icon-sm">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-funnel"></use>
</svg>
</a>
</div>
</section>
<section class="bg-gray-light">
<div class="container">
<div class="row">
<div class="tipologia-menu col-lg-3 bg-white bg-white-left">
<aside class="aside-list aside-sticky">
<div class="d-flex d-lg-none mb-3 align-items-center">
<a class="toggle-filtri pe-2" href="#" aria-label="chiudi filtri" id="back-filtri-tipologia" title="Chiudi i filtri per tipologia">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-arrow-left"></use>
</svg>
</a>
<p class="h6 mb-0 label-filter lh100"><strong>Filtri</strong></p>
</div>
<h2 class="h6 text-uppercase"><strong>Tipologia</strong></h2>
<?php
// Mostro le categorie che hanno la stessa categoria parent
$db = Factory::getContainer()->get('DatabaseDriver');
$query = $db->getQuery(true);
$query->select($db->quoteName(array('title', 'id','language')))
->from($db->quoteName('#__categories'))
->where($db->quoteName('parent_id') . ' = '. $this->category->parent_id)
->where($db->quoteName('extension') . ' = ' . $db->quote('com_content'));
$db->setQuery($query);
$rows = $db->loadObjectList();
?>
<ul class="">
<?php foreach ($rows as $row) : ?>
<div class="form-check my-0">
<li class="catsamelevel">
<input type="RADIO" value="<?php echo Route::_(RouteHelper::getCategoryRoute($row->id, $row->language)); ?>" onchange="window.open(this.value, '_self')" name="<?php echo $row->title; ?>" id="check-<?php echo $row->title; ?>" <?php echo ($catactive == $row->title) ? ('checked') :''; ?>>
<label class="mb-0" for="check-<?php echo $row->title; ?>"><?php echo $row->title; ?></label>
</li>
</div>
<?php endforeach ?>
</ul>
</aside>
</div>
<div class="col-lg-8 col-xl-7 offset-lg-1 pt84">
<?php foreach ($this->intro_items as $key => &$item) :
$this->item = & $item;
echo $this->loadTemplate('item');
endforeach; ?>
</div>
</div>
</div>
</div>
</section>
<?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', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-content-category-blog__navigation w-100">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="com-content-category-blog__counter counter float-end pt-3 pe-2">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
<div class="com-content-category-blog__pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>

View File

@ -0,0 +1,698 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="Blog per la categoria Eventi" option="eventi">
<help key = "Menu_Item:_Category_Blog" />
<message>
<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
</message>
</layout>
<!-- Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldprefix="Joomla\Component\Categories\Administrator\Field"
>
<field
name="id"
type="modal_category"
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
extension="com_content"
required="true"
select="true"
new="true"
edit="true"
clear="true"
/>
<field
name="filter_tag"
type="tag"
label="JTAG"
multiple="true"
mode="nested"
custom="deny"
/>
</fieldset>
</fields>
<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
<fieldset name="basic" label="JGLOBAL_CATEGORY_OPTIONS">
<field
name="layout_type"
type="hidden"
default="blog"
/>
<field
name="show_category_title"
type="list"
label="JGLOBAL_SHOW_CATEGORY_TITLE"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description"
type="list"
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description_image"
type="list"
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="maxLevel"
type="list"
label="JGLOBAL_MAXLEVEL_LABEL"
description="JGLOBAL_MAXLEVEL_DESC"
useglobal="true"
validate="options"
>
<option value="-1">JALL</option>
<option value="0">JNONE</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="show_empty_categories"
type="list"
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_no_articles"
type="list"
label="COM_CONTENT_NO_ARTICLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category_heading_title_text"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_HEADING"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_subcat_desc"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_num_articles"
type="list"
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="advanced" label="JGLOBAL_BLOG_LAYOUT_OPTIONS" description="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL">
<field
name="num_leading_articles"
type="number"
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class_leading"
type="text"
label="JGLOBAL_BLOG_CLASS_LEADING"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_intro_articles"
type="number"
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class"
type="text"
label="JGLOBAL_BLOG_CLASS"
description="JGLOBAL_BLOG_CLASS_NOTE_DESC"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_columns"
type="number"
label="JGLOBAL_NUM_COLUMNS_LABEL"
filter="integer"
parentclass="stack span-1-inline"
useglobal="true"
/>
<field
name="multi_column_order"
type="list"
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
parentclass="stack span-2-inline"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_BLOG_DOWN_OPTION</option>
<option value="1">JGLOBAL_BLOG_ACROSS_OPTION</option>
</field>
<field
name="num_links"
type="number"
label="JGLOBAL_NUM_LINKS_LABEL"
filter="integer"
parentclass="stack span-1"
useglobal="true"
/>
<field
name="show_featured"
type="list"
label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="show">JSHOW</option>
<option value="hide">JHIDE</option>
<option value="only">JONLY</option>
</field>
<field
name="link_intro_image"
type="list"
label="JGLOBAL_LINKED_INTRO_IMAGE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_subcategory_content"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNONE</option>
<option value="-1">JALL</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="orderby_pri"
type="list"
label="JGLOBAL_CATEGORY_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2"
>
<option value="none">JGLOBAL_NO_ORDER</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
</field>
<field
name="orderby_sec"
type="list"
label="JGLOBAL_ARTICLE_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="front">COM_CONTENT_FEATURED_ORDER</option>
<option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
<option value="date">JGLOBAL_OLDEST_FIRST</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
<option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
<option value="hits" requires="hits">JGLOBAL_MOST_HITS</option>
<option value="rhits" requires="hits">JGLOBAL_LEAST_HITS</option>
<option value="random">JGLOBAL_RANDOM_ORDER</option>
<option value="order">JGLOBAL_ORDERING</option>
<option value="rorder">JGLOBAL_REVERSE_ORDERING</option>
<option value="vote" requires="vote">JGLOBAL_VOTES_DESC</option>
<option value="rvote" requires="vote">JGLOBAL_VOTES_ASC</option>
<option value="rank" requires="vote">JGLOBAL_RATINGS_DESC</option>
<option value="rrank" requires="vote">JGLOBAL_RATINGS_ASC</option>
</field>
<field
name="order_date"
type="list"
label="JGLOBAL_ORDERING_DATE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="created">JGLOBAL_CREATED</option>
<option value="modified">JGLOBAL_MODIFIED</option>
<option value="published">JPUBLISHED</option>
<option value="unpublished">JUNPUBLISHED</option>
</field>
<field
name="show_pagination"
type="list"
label="JGLOBAL_PAGINATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
<option value="2">JGLOBAL_AUTO</option>
</field>
<field
name="show_pagination_results"
type="list"
label="JGLOBAL_PAGINATION_RESULTS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
addfieldprefix="Joomla\Component\Content\Administrator\Field"
>
<field
name="article_layout"
type="componentlayout"
label="JGLOBAL_FIELD_LAYOUT_LABEL"
description="JGLOBAL_FIELD_LAYOUT_DESC"
class="form-select"
menuitems="true"
extension="com_content"
view="article"
/>
<field
name="show_title"
type="list"
label="JGLOBAL_SHOW_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_titles"
type="list"
label="JGLOBAL_LINKED_TITLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_intro"
type="list"
label="JGLOBAL_SHOW_INTRO_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="info_block_position"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
</field>
<field
name="info_block_show_title"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_category"
type="list"
label="JGLOBAL_LINK_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_parent_category"
type="list"
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_parent_category"
type="list"
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_associations"
type="assoc"
label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
useglobal="true"
class="form-select-color-state"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_author"
type="list"
label="JGLOBAL_SHOW_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_author"
type="list"
label="JGLOBAL_LINK_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_create_date"
type="list"
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_modify_date"
type="list"
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_publish_date"
type="list"
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_item_navigation"
type="list"
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_vote"
type="votelist"
label="JGLOBAL_SHOW_VOTE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore"
type="list"
label="JGLOBAL_SHOW_READMORE_LABEL"
description="JGLOBAL_SHOW_READMORE_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore_title"
type="list"
label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_hits"
type="list"
label="JGLOBAL_SHOW_HITS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_noauth"
type="list"
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
<fieldset name="integration" label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
<field
name="show_feed_link"
type="list"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="feed_summary"
type="list"
label="JGLOBAL_FEED_SUMMARY_LABEL"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_INTRO_TEXT</option>
<option value="1">JGLOBAL_FULL_TEXT</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,84 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2010 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
$lang = Factory::getLanguage();
$user = Factory::getUser();
$groups = $user->getAuthorisedViewLevels();
if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : ?>
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
<?php // Check whether category access level allows access to subcategories. ?>
<?php if (in_array($child->access, $groups)) : ?>
<?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) : ?>
<div class="com-content-category-blog__child">
<?php if ($lang->isRtl()) : ?>
<h3 class="page-header item-title">
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php else : ?>
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info">
<?php echo Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
<?php if ($child->description) : ?>
<div class="com-content-category-blog__description category-desc">
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<div class="com-content-category-blog__children collapse fade" id="category-<?php echo $child->id; ?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
echo $this->loadTemplate('children');
$this->category = $child->getParent();
$this->maxLevel++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif;

View File

@ -0,0 +1,95 @@
<?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\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;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<article class="card card-bg card-article card-article-greendark">
<div class="card-body">
<div class="card-article-img d-none d-lg-block">
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if($introimg->image_intro ==''){ ?>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" title="service-link"><svg class="icon-greendark svg-newspaper"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="<?= $baseImagePath ?>sprites.svg#it-note"></use></svg></a>
<?php } else{
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
}
?>
</div>
<div class="card-article-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_item_title_servizio', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?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; ?>
<p><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></p>
<?php if ($info == 1 || $info == 2) : ?>
<?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>
</div>
</article>

View File

@ -0,0 +1,94 @@
<?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\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;
use Joomla\CMS\Language\Text;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="card card-servizi card-bg card-icon rounded h-100 m-3">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<div class="card-body">
<div class="card-icon-content d-flex align-items-center">
<div class="card-news-img me-3">
<?php if($introimg->image_intro ==''){ ?>
<figure>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>">
<img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid"/>
</a>
</figure>
<?php } else{
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
}
?>
</div>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_sottocategoria_item_title', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<small><?php echo JHTML::_('string.truncate', $this->item->introtext, 80, false, false) ; ?></small>
<?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; ?>
</a>
</div>
</div>
</div>

View File

@ -0,0 +1,81 @@
<?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\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;
use Joomla\CMS\Language\Text;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
?>
<div class="card card-servizi card-bg card-icon rounded h-100 m-3">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<div class="card-body">
<div class="card-icon-content d-flex align-items-center">
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_sottocategoria_item_title', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<small><?php echo JHTML::_('string.truncate', $this->item->introtext, 80, false, false) ; ?></small>
<?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; ?>
</a>
</div>
</div>
</div>

View File

@ -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;
?>
<ol 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; ?>
</ol>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,698 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="Blog per le categorie della sezione luoghi della scuola" option="luoghi">
<help key = "Menu_Item:_Category_Blog" />
<message>
<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
</message>
</layout>
<!-- Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldprefix="Joomla\Component\Categories\Administrator\Field"
>
<field
name="id"
type="modal_category"
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
extension="com_content"
required="true"
select="true"
new="true"
edit="true"
clear="true"
/>
<field
name="filter_tag"
type="tag"
label="JTAG"
multiple="true"
mode="nested"
custom="deny"
/>
</fieldset>
</fields>
<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
<fieldset name="basic" label="JGLOBAL_CATEGORY_OPTIONS">
<field
name="layout_type"
type="hidden"
default="blog"
/>
<field
name="show_category_title"
type="list"
label="JGLOBAL_SHOW_CATEGORY_TITLE"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description"
type="list"
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description_image"
type="list"
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="maxLevel"
type="list"
label="JGLOBAL_MAXLEVEL_LABEL"
description="JGLOBAL_MAXLEVEL_DESC"
useglobal="true"
validate="options"
>
<option value="-1">JALL</option>
<option value="0">JNONE</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="show_empty_categories"
type="list"
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_no_articles"
type="list"
label="COM_CONTENT_NO_ARTICLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category_heading_title_text"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_HEADING"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_subcat_desc"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_num_articles"
type="list"
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="advanced" label="JGLOBAL_BLOG_LAYOUT_OPTIONS" description="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL">
<field
name="num_leading_articles"
type="number"
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class_leading"
type="text"
label="JGLOBAL_BLOG_CLASS_LEADING"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_intro_articles"
type="number"
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class"
type="text"
label="JGLOBAL_BLOG_CLASS"
description="JGLOBAL_BLOG_CLASS_NOTE_DESC"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_columns"
type="number"
label="JGLOBAL_NUM_COLUMNS_LABEL"
filter="integer"
parentclass="stack span-1-inline"
useglobal="true"
/>
<field
name="multi_column_order"
type="list"
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
parentclass="stack span-2-inline"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_BLOG_DOWN_OPTION</option>
<option value="1">JGLOBAL_BLOG_ACROSS_OPTION</option>
</field>
<field
name="num_links"
type="number"
label="JGLOBAL_NUM_LINKS_LABEL"
filter="integer"
parentclass="stack span-1"
useglobal="true"
/>
<field
name="show_featured"
type="list"
label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="show">JSHOW</option>
<option value="hide">JHIDE</option>
<option value="only">JONLY</option>
</field>
<field
name="link_intro_image"
type="list"
label="JGLOBAL_LINKED_INTRO_IMAGE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_subcategory_content"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNONE</option>
<option value="-1">JALL</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="orderby_pri"
type="list"
label="JGLOBAL_CATEGORY_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2"
>
<option value="none">JGLOBAL_NO_ORDER</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
</field>
<field
name="orderby_sec"
type="list"
label="JGLOBAL_ARTICLE_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="front">COM_CONTENT_FEATURED_ORDER</option>
<option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
<option value="date">JGLOBAL_OLDEST_FIRST</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
<option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
<option value="hits" requires="hits">JGLOBAL_MOST_HITS</option>
<option value="rhits" requires="hits">JGLOBAL_LEAST_HITS</option>
<option value="random">JGLOBAL_RANDOM_ORDER</option>
<option value="order">JGLOBAL_ORDERING</option>
<option value="rorder">JGLOBAL_REVERSE_ORDERING</option>
<option value="vote" requires="vote">JGLOBAL_VOTES_DESC</option>
<option value="rvote" requires="vote">JGLOBAL_VOTES_ASC</option>
<option value="rank" requires="vote">JGLOBAL_RATINGS_DESC</option>
<option value="rrank" requires="vote">JGLOBAL_RATINGS_ASC</option>
</field>
<field
name="order_date"
type="list"
label="JGLOBAL_ORDERING_DATE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="created">JGLOBAL_CREATED</option>
<option value="modified">JGLOBAL_MODIFIED</option>
<option value="published">JPUBLISHED</option>
<option value="unpublished">JUNPUBLISHED</option>
</field>
<field
name="show_pagination"
type="list"
label="JGLOBAL_PAGINATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
<option value="2">JGLOBAL_AUTO</option>
</field>
<field
name="show_pagination_results"
type="list"
label="JGLOBAL_PAGINATION_RESULTS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
addfieldprefix="Joomla\Component\Content\Administrator\Field"
>
<field
name="article_layout"
type="componentlayout"
label="JGLOBAL_FIELD_LAYOUT_LABEL"
description="JGLOBAL_FIELD_LAYOUT_DESC"
class="form-select"
menuitems="true"
extension="com_content"
view="article"
/>
<field
name="show_title"
type="list"
label="JGLOBAL_SHOW_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_titles"
type="list"
label="JGLOBAL_LINKED_TITLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_intro"
type="list"
label="JGLOBAL_SHOW_INTRO_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="info_block_position"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
</field>
<field
name="info_block_show_title"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_category"
type="list"
label="JGLOBAL_LINK_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_parent_category"
type="list"
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_parent_category"
type="list"
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_associations"
type="assoc"
label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
useglobal="true"
class="form-select-color-state"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_author"
type="list"
label="JGLOBAL_SHOW_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_author"
type="list"
label="JGLOBAL_LINK_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_create_date"
type="list"
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_modify_date"
type="list"
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_publish_date"
type="list"
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_item_navigation"
type="list"
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_vote"
type="votelist"
label="JGLOBAL_SHOW_VOTE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore"
type="list"
label="JGLOBAL_SHOW_READMORE_LABEL"
description="JGLOBAL_SHOW_READMORE_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore_title"
type="list"
label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_hits"
type="list"
label="JGLOBAL_SHOW_HITS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_noauth"
type="list"
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
<fieldset name="integration" label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
<field
name="show_feed_link"
type="list"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="feed_summary"
type="list"
label="JGLOBAL_FEED_SUMMARY_LABEL"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_INTRO_TEXT</option>
<option value="1">JGLOBAL_FULL_TEXT</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,84 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2010 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
$lang = Factory::getLanguage();
$user = Factory::getUser();
$groups = $user->getAuthorisedViewLevels();
if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : ?>
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
<?php // Check whether category access level allows access to subcategories. ?>
<?php if (in_array($child->access, $groups)) : ?>
<?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) : ?>
<div class="com-content-category-blog__child">
<?php if ($lang->isRtl()) : ?>
<h3 class="page-header item-title">
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php else : ?>
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info">
<?php echo Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
<?php if ($child->description) : ?>
<div class="com-content-category-blog__description category-desc">
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<div class="com-content-category-blog__children collapse fade" id="category-<?php echo $child->id; ?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
echo $this->loadTemplate('children');
$this->category = $child->getParent();
$this->maxLevel++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif;

View File

@ -0,0 +1,94 @@
<?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\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;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<article class="card card-bg card-article card-article-redbrown">
<div class="card-body">
<div class="card-article-img d-none d-lg-block">
<?php if ($introimg->image_intro =='') {
?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php
} else {
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
}
?>
</div>
<div class="card-article-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_item_title_servizio', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?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; ?>
<p><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></p>
<?php if ($info == 1 || $info == 2) : ?>
<?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>
</div>
</article>

View File

@ -0,0 +1,87 @@
<?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\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;
use Joomla\CMS\Language\Text;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="card card-servizi card-bg card-icon rounded h-100">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" data-element="service-link">
<div class="card-body">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-map-marker"></use>
</svg>
<div class="card-icon-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_sottocategoria_item_title', $this->item); ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<small><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></small>
<?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>
</div>
</a>
</div>

View File

@ -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;
?>
<ol 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; ?>
</ol>

View File

@ -0,0 +1,244 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
use Joomla\CMS\Uri\Uri;
$url = Uri::root();
$app = Factory::getApplication();
$this->category->text = $this->category->description;
$app->triggerEvent('onContentPrepare', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$this->category->description = $this->category->text;
$results = $app->triggerEvent('onContentAfterTitle', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayTitle = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentBeforeDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$beforeDisplayContent = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentAfterDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayContent = trim(implode("\n", $results));
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
//echo json_encode($this->category);
//echo $this->category->parent_id;
$catactive = $this->category->title;
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="blogj4a blog-category" itemscope itemtype="https://schema.org/Blog">
<section class="section bg-greendark bg-greendarkgradient py-5 position-relative d-flex align-items-center overflow-hidden">
<div class="green-square-forms">
<svg width="100%" height="100%" viewBox="0 0 726 360" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Group" opacity="0.32"><path id="Rectangle" d="M627.751,245.625l-396.368,-193.321l-193.322,396.368l396.368,193.321l193.322,-396.368Z" style="fill:url(#_Linear1);"></path><path id="Rectangle1" serif:id="Rectangle" d="M583.359,-179.506l-264.865,159.147l159.147,264.865l264.865,-159.147l-159.147,-264.865Z" style="fill:url(#_Linear2);"></path><path id="Rectangle2" serif:id="Rectangle" d="M210.182,-54.565l-213.341,33.79l33.79,213.34l213.341,-33.79l-33.79,-213.34Z" style="fill:url(#_Linear3);"></path></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(203.046,589.69,-589.69,203.046,231.383,52.3035)"><stop offset="0" style="stop-color:#0f842e;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(344.438,-26.7144,26.7144,344.438,398.068,112.073)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(230.236,72.8805,-72.8805,230.236,13.7359,85.8949)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient></defs>
</svg>
</div>
<div class="container">
<div class="row">
<div class="col-md-5">
<div class="hero-title text-left">
<?php if ($this->params->get('show_category_title', 1)) : ?>
<h1><?php echo $this->category->title; ?></h1>
<?php endif; ?>
<?php if ($this->params->get('show_page_heading')) : ?>
<h1><?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
<?php endif; ?>
<?php echo $afterDisplayTitle; ?>
<?php if ($this->params->get('show_cat_tags', 1) && !empty($this->category->tags->itemTags)) : ?>
<?php $this->category->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->category->tagLayout->render($this->category->tags->itemTags); ?>
<?php endif; ?>
</div>
<?php if ($beforeDisplayContent || $afterDisplayContent || $this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<div class="category-desc clearfix h4 font-weight-normal">
<?php echo $beforeDisplayContent; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo HTMLHelper::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
<?php endif; ?>
<?php echo $afterDisplayContent; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<div class="wrapperblog redbrown <?php echo $this->params->get('blog_class') ?>">
<?php if (empty($this->lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?>
<?php if ($this->params->get('show_no_articles', 1)) : ?>
<div class="container">
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_CONTENT_NO_ARTICLES'); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->children[$this->category->id]) : ?>
<div class="wrapper-subcategorie">
<?php foreach ($this->children[$this->category->id] as $kategorie) : ?>
<section class="py-5">
<div class="container">
<div class="title-section ms-3 mb-2">
<h2 class="h4"><?php echo $kategorie->title; ?></h2>
</div>
<div class="row">
<?php $kategoriereset = 0; ?>
<?php if (!empty($this->intro_items)) : ?>
<?php if ($kategorie->title == "Notizie") {?>
<div class="col-12">
<div class="owl-carousel owl-theme carousel-theme" id="carosellonotizie">
<?php foreach ($this->intro_items as $key => &$item) :
if ($item->catid !== $kategorie->id) {
continue;
}
$this->item = & $item;
echo $this->loadTemplate('itemsottocategorie');
endforeach; ?>
</div>
</div>
<?php } elseif ($kategorie->title == "Circolari") { ?>
<div class="col-12">
<div class="owl-carousel owl-theme carousel-theme" id="carosellocircolari">
<?php foreach ($this->intro_items as $key => &$item) :
if ($item->catid !== $kategorie->id) {
continue;
} ?>
<?php
$this->item = & $item;
echo $this->loadTemplate('itemsottocategorienoimg'); ?>
<?php
endforeach; ?>
</div>
</div>
<?php } elseif ($kategorie->title == "Eventi") { ?>
<div class="col-12">
<div class="owl-carousel owl-theme carousel-theme" id="caroselloeventi">
<?php foreach ($this->intro_items as $key => &$item) :
if ($item->catid !== $kategorie->id) {
continue;
} ?>
<?php
$this->item = & $item;
echo $this->loadTemplate('itemsottocategorienoimg'); ?>
<?php
endforeach; ?>
</div>
</div>
<?php } ?>
<?php endif; ?>
</div>
<div class="text-center pt-3">
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($kategorie->id, $kategorie->language)); ?>" class="text-underline small">Vedi tutti</a>
</div>
</div>
</section>
<?php endforeach; ?>
</div>
<?php elseif (!empty($this->intro_items)) : ?>
<section class="bg-white border-top border-bottom d-block d-lg-none">
<div class="container d-flex justify-content-between align-items-center py-3">
<h3 class="h6 text-uppercase mb-0 label-filter"><strong>Filtri</strong></h3>
<a class="toggle-filtri" href="#" aria-label="filtri" id="filtri-tipologia" title="Filtra per tipologia">
<svg class="icon icon-sm">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-funnel"></use>
</svg>
</a>
</div>
</section>
<section class="bg-gray-light">
<div class="container">
<div class="row">
<div class="tipologia-menu col-lg-3 bg-white bg-white-left">
<aside class="aside-list aside-sticky">
<div class="d-flex d-lg-none mb-3 align-items-center">
<a class="toggle-filtri pe-2" href="#" aria-label="chiudi filtri" id="back-filtri-tipologia" title="Chiudi i filtri per tipologia">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-arrow-left"></use>
</svg>
</a>
<p class="h6 mb-0 label-filter lh100"><strong>Filtri</strong></p>
</div>
<h2 class="h6 text-uppercase"><strong>Tipologia</strong></h2>
<?php
// Mostro le categorie che hanno la stessa categoria parent
$db = Factory::getContainer()->get('DatabaseDriver');
$query = $db->getQuery(true);
$query->select($db->quoteName(array('title', 'id','language')))
->from($db->quoteName('#__categories'))
->where($db->quoteName('parent_id') . ' = '. $this->category->parent_id)
->where($db->quoteName('extension') . ' = ' . $db->quote('com_content'));
$db->setQuery($query);
$rows = $db->loadObjectList();
?>
<ul class="">
<?php foreach ($rows as $row) : ?>
<div class="form-check my-0">
<li class="catsamelevel">
<input type="RADIO" value="<?php echo Route::_(RouteHelper::getCategoryRoute($row->id, $row->language)); ?>" onchange="window.open(this.value, '_self')" name="<?php echo $row->title; ?>" id="check-<?php echo $row->title; ?>" <?php echo ($catactive == $row->title) ? ('checked') :''; ?>>
<label class="mb-0" for="check-<?php echo $row->title; ?>"><?php echo $row->title; ?></label>
</li>
</div>
<?php endforeach ?>
</ul>
</aside>
</div>
<div class="col-lg-8 col-xl-7 offset-lg-1 pt84">
<?php foreach ($this->intro_items as $key => &$item) :
$this->item = & $item;
echo $this->loadTemplate('item');
endforeach; ?>
</div>
</div>
</div>
</div>
</section>
<?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', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-content-category-blog__navigation w-100">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="com-content-category-blog__counter counter float-end pt-3 pe-2">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
<div class="com-content-category-blog__pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>

View File

@ -0,0 +1,698 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="Blog per le categorie della sezione Novità" option="novita">
<help key = "Menu_Item:_Category_Blog" />
<message>
<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
</message>
</layout>
<!-- Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldprefix="Joomla\Component\Categories\Administrator\Field"
>
<field
name="id"
type="modal_category"
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
extension="com_content"
required="true"
select="true"
new="true"
edit="true"
clear="true"
/>
<field
name="filter_tag"
type="tag"
label="JTAG"
multiple="true"
mode="nested"
custom="deny"
/>
</fieldset>
</fields>
<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
<fieldset name="basic" label="JGLOBAL_CATEGORY_OPTIONS">
<field
name="layout_type"
type="hidden"
default="blog"
/>
<field
name="show_category_title"
type="list"
label="JGLOBAL_SHOW_CATEGORY_TITLE"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description"
type="list"
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description_image"
type="list"
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="maxLevel"
type="list"
label="JGLOBAL_MAXLEVEL_LABEL"
description="JGLOBAL_MAXLEVEL_DESC"
useglobal="true"
validate="options"
>
<option value="-1">JALL</option>
<option value="0">JNONE</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="show_empty_categories"
type="list"
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_no_articles"
type="list"
label="COM_CONTENT_NO_ARTICLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category_heading_title_text"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_HEADING"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_subcat_desc"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_num_articles"
type="list"
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="advanced" label="JGLOBAL_BLOG_LAYOUT_OPTIONS" description="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL">
<field
name="num_leading_articles"
type="number"
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class_leading"
type="text"
label="JGLOBAL_BLOG_CLASS_LEADING"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_intro_articles"
type="number"
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class"
type="text"
label="JGLOBAL_BLOG_CLASS"
description="JGLOBAL_BLOG_CLASS_NOTE_DESC"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_columns"
type="number"
label="JGLOBAL_NUM_COLUMNS_LABEL"
filter="integer"
parentclass="stack span-1-inline"
useglobal="true"
/>
<field
name="multi_column_order"
type="list"
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
parentclass="stack span-2-inline"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_BLOG_DOWN_OPTION</option>
<option value="1">JGLOBAL_BLOG_ACROSS_OPTION</option>
</field>
<field
name="num_links"
type="number"
label="JGLOBAL_NUM_LINKS_LABEL"
filter="integer"
parentclass="stack span-1"
useglobal="true"
/>
<field
name="show_featured"
type="list"
label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="show">JSHOW</option>
<option value="hide">JHIDE</option>
<option value="only">JONLY</option>
</field>
<field
name="link_intro_image"
type="list"
label="JGLOBAL_LINKED_INTRO_IMAGE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_subcategory_content"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNONE</option>
<option value="-1">JALL</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="orderby_pri"
type="list"
label="JGLOBAL_CATEGORY_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2"
>
<option value="none">JGLOBAL_NO_ORDER</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
</field>
<field
name="orderby_sec"
type="list"
label="JGLOBAL_ARTICLE_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="front">COM_CONTENT_FEATURED_ORDER</option>
<option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
<option value="date">JGLOBAL_OLDEST_FIRST</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
<option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
<option value="hits" requires="hits">JGLOBAL_MOST_HITS</option>
<option value="rhits" requires="hits">JGLOBAL_LEAST_HITS</option>
<option value="random">JGLOBAL_RANDOM_ORDER</option>
<option value="order">JGLOBAL_ORDERING</option>
<option value="rorder">JGLOBAL_REVERSE_ORDERING</option>
<option value="vote" requires="vote">JGLOBAL_VOTES_DESC</option>
<option value="rvote" requires="vote">JGLOBAL_VOTES_ASC</option>
<option value="rank" requires="vote">JGLOBAL_RATINGS_DESC</option>
<option value="rrank" requires="vote">JGLOBAL_RATINGS_ASC</option>
</field>
<field
name="order_date"
type="list"
label="JGLOBAL_ORDERING_DATE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="created">JGLOBAL_CREATED</option>
<option value="modified">JGLOBAL_MODIFIED</option>
<option value="published">JPUBLISHED</option>
<option value="unpublished">JUNPUBLISHED</option>
</field>
<field
name="show_pagination"
type="list"
label="JGLOBAL_PAGINATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
<option value="2">JGLOBAL_AUTO</option>
</field>
<field
name="show_pagination_results"
type="list"
label="JGLOBAL_PAGINATION_RESULTS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
addfieldprefix="Joomla\Component\Content\Administrator\Field"
>
<field
name="article_layout"
type="componentlayout"
label="JGLOBAL_FIELD_LAYOUT_LABEL"
description="JGLOBAL_FIELD_LAYOUT_DESC"
class="form-select"
menuitems="true"
extension="com_content"
view="article"
/>
<field
name="show_title"
type="list"
label="JGLOBAL_SHOW_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_titles"
type="list"
label="JGLOBAL_LINKED_TITLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_intro"
type="list"
label="JGLOBAL_SHOW_INTRO_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="info_block_position"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
</field>
<field
name="info_block_show_title"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_category"
type="list"
label="JGLOBAL_LINK_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_parent_category"
type="list"
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_parent_category"
type="list"
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_associations"
type="assoc"
label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
useglobal="true"
class="form-select-color-state"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_author"
type="list"
label="JGLOBAL_SHOW_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_author"
type="list"
label="JGLOBAL_LINK_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_create_date"
type="list"
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_modify_date"
type="list"
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_publish_date"
type="list"
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_item_navigation"
type="list"
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_vote"
type="votelist"
label="JGLOBAL_SHOW_VOTE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore"
type="list"
label="JGLOBAL_SHOW_READMORE_LABEL"
description="JGLOBAL_SHOW_READMORE_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore_title"
type="list"
label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_hits"
type="list"
label="JGLOBAL_SHOW_HITS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_noauth"
type="list"
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
<fieldset name="integration" label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
<field
name="show_feed_link"
type="list"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="feed_summary"
type="list"
label="JGLOBAL_FEED_SUMMARY_LABEL"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_INTRO_TEXT</option>
<option value="1">JGLOBAL_FULL_TEXT</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,84 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2010 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
$lang = Factory::getLanguage();
$user = Factory::getUser();
$groups = $user->getAuthorisedViewLevels();
if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : ?>
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
<?php // Check whether category access level allows access to subcategories. ?>
<?php if (in_array($child->access, $groups)) : ?>
<?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) : ?>
<div class="com-content-category-blog__child">
<?php if ($lang->isRtl()) : ?>
<h3 class="page-header item-title">
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php else : ?>
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info">
<?php echo Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
<?php if ($child->description) : ?>
<div class="com-content-category-blog__description category-desc">
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<div class="com-content-category-blog__children collapse fade" id="category-<?php echo $child->id; ?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
echo $this->loadTemplate('children');
$this->category = $child->getParent();
$this->maxLevel++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif;

View File

@ -0,0 +1,106 @@
<?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\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;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
//$pubblicazione = Factory::getDate()->format('d.M.Y');
$time = strtotime($pubblicazione);
$day = date('d',$time);
$month = date('M',$time);
$year = date('Y',$time);
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<article class="card card-bg card-article card-article-greendark">
<div class="card-body">
<div class="card-article-img d-none d-lg-block">
<div class="date">
<span class="year"><?php echo $year;?></span>
<span class="day"><?php echo $day;?></span>
<span class="month"><?php echo $month;?></span>
</div>
<?php if($introimg->image_intro ==''){ ?>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" title="service-link"><svg class="icon-greendark svg-newspaper"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="<?= $baseImagePath ?>sprites.svg#it-note"></use></svg></a>
<?php } else{
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
}
?>
</div>
<div class="card-article-content">
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_item_title_servizio', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?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; ?>
<p><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></p>
<?php if ($info == 1 || $info == 2) : ?>
<?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>
</div>
</article>

View File

@ -0,0 +1,90 @@
<?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\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;
use Joomla\CMS\Language\Text;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="card card-servizi card-bg card-icon rounded h-100 m-3">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<div class="card-body">
<div class="card-icon-content d-flex align-items-center">
<div class="card-news-img me-3">
<?php if($introimg->image_intro =='') { ?>
<figure>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>">
<img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/>
</a>
</figure>
<?php } else {
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
}
?>
</div>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_sottocategoria_item_title', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<small><?php echo JHTML::_('string.truncate', $this->item->introtext, 80, false, false) ; ?></small>
<?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; ?>
</a>
</div>
</div>
</div>

View File

@ -0,0 +1,81 @@
<?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\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;
use Joomla\CMS\Language\Text;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
?>
<div class="card card-servizi card-bg card-icon rounded h-100 m-3">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<div class="card-body">
<div class="card-icon-content d-flex align-items-center">
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_sottocategoria_item_title', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<small><?php echo JHTML::_('string.truncate', $this->item->introtext, 80, false, false) ; ?></small>
<?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; ?>
</a>
</div>
</div>
</div>

View File

@ -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;
?>
<ol 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; ?>
</ol>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,698 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="Blog per le categorie della sezione organizzazione della scuola" option="organizzazione">
<help key = "Menu_Item:_Category_Blog" />
<message>
<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
</message>
</layout>
<!-- Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldprefix="Joomla\Component\Categories\Administrator\Field"
>
<field
name="id"
type="modal_category"
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
extension="com_content"
required="true"
select="true"
new="true"
edit="true"
clear="true"
/>
<field
name="filter_tag"
type="tag"
label="JTAG"
multiple="true"
mode="nested"
custom="deny"
/>
</fieldset>
</fields>
<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
<fieldset name="basic" label="JGLOBAL_CATEGORY_OPTIONS">
<field
name="layout_type"
type="hidden"
default="blog"
/>
<field
name="show_category_title"
type="list"
label="JGLOBAL_SHOW_CATEGORY_TITLE"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description"
type="list"
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description_image"
type="list"
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="maxLevel"
type="list"
label="JGLOBAL_MAXLEVEL_LABEL"
description="JGLOBAL_MAXLEVEL_DESC"
useglobal="true"
validate="options"
>
<option value="-1">JALL</option>
<option value="0">JNONE</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="show_empty_categories"
type="list"
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_no_articles"
type="list"
label="COM_CONTENT_NO_ARTICLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category_heading_title_text"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_HEADING"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_subcat_desc"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_num_articles"
type="list"
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="advanced" label="JGLOBAL_BLOG_LAYOUT_OPTIONS" description="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL">
<field
name="num_leading_articles"
type="number"
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class_leading"
type="text"
label="JGLOBAL_BLOG_CLASS_LEADING"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_intro_articles"
type="number"
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class"
type="text"
label="JGLOBAL_BLOG_CLASS"
description="JGLOBAL_BLOG_CLASS_NOTE_DESC"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_columns"
type="number"
label="JGLOBAL_NUM_COLUMNS_LABEL"
filter="integer"
parentclass="stack span-1-inline"
useglobal="true"
/>
<field
name="multi_column_order"
type="list"
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
parentclass="stack span-2-inline"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_BLOG_DOWN_OPTION</option>
<option value="1">JGLOBAL_BLOG_ACROSS_OPTION</option>
</field>
<field
name="num_links"
type="number"
label="JGLOBAL_NUM_LINKS_LABEL"
filter="integer"
parentclass="stack span-1"
useglobal="true"
/>
<field
name="show_featured"
type="list"
label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="show">JSHOW</option>
<option value="hide">JHIDE</option>
<option value="only">JONLY</option>
</field>
<field
name="link_intro_image"
type="list"
label="JGLOBAL_LINKED_INTRO_IMAGE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_subcategory_content"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNONE</option>
<option value="-1">JALL</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="orderby_pri"
type="list"
label="JGLOBAL_CATEGORY_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2"
>
<option value="none">JGLOBAL_NO_ORDER</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
</field>
<field
name="orderby_sec"
type="list"
label="JGLOBAL_ARTICLE_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="front">COM_CONTENT_FEATURED_ORDER</option>
<option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
<option value="date">JGLOBAL_OLDEST_FIRST</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
<option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
<option value="hits" requires="hits">JGLOBAL_MOST_HITS</option>
<option value="rhits" requires="hits">JGLOBAL_LEAST_HITS</option>
<option value="random">JGLOBAL_RANDOM_ORDER</option>
<option value="order">JGLOBAL_ORDERING</option>
<option value="rorder">JGLOBAL_REVERSE_ORDERING</option>
<option value="vote" requires="vote">JGLOBAL_VOTES_DESC</option>
<option value="rvote" requires="vote">JGLOBAL_VOTES_ASC</option>
<option value="rank" requires="vote">JGLOBAL_RATINGS_DESC</option>
<option value="rrank" requires="vote">JGLOBAL_RATINGS_ASC</option>
</field>
<field
name="order_date"
type="list"
label="JGLOBAL_ORDERING_DATE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="created">JGLOBAL_CREATED</option>
<option value="modified">JGLOBAL_MODIFIED</option>
<option value="published">JPUBLISHED</option>
<option value="unpublished">JUNPUBLISHED</option>
</field>
<field
name="show_pagination"
type="list"
label="JGLOBAL_PAGINATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
<option value="2">JGLOBAL_AUTO</option>
</field>
<field
name="show_pagination_results"
type="list"
label="JGLOBAL_PAGINATION_RESULTS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
addfieldprefix="Joomla\Component\Content\Administrator\Field"
>
<field
name="article_layout"
type="componentlayout"
label="JGLOBAL_FIELD_LAYOUT_LABEL"
description="JGLOBAL_FIELD_LAYOUT_DESC"
class="form-select"
menuitems="true"
extension="com_content"
view="article"
/>
<field
name="show_title"
type="list"
label="JGLOBAL_SHOW_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_titles"
type="list"
label="JGLOBAL_LINKED_TITLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_intro"
type="list"
label="JGLOBAL_SHOW_INTRO_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="info_block_position"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
</field>
<field
name="info_block_show_title"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_category"
type="list"
label="JGLOBAL_LINK_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_parent_category"
type="list"
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_parent_category"
type="list"
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_associations"
type="assoc"
label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
useglobal="true"
class="form-select-color-state"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_author"
type="list"
label="JGLOBAL_SHOW_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_author"
type="list"
label="JGLOBAL_LINK_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_create_date"
type="list"
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_modify_date"
type="list"
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_publish_date"
type="list"
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_item_navigation"
type="list"
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_vote"
type="votelist"
label="JGLOBAL_SHOW_VOTE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore"
type="list"
label="JGLOBAL_SHOW_READMORE_LABEL"
description="JGLOBAL_SHOW_READMORE_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore_title"
type="list"
label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_hits"
type="list"
label="JGLOBAL_SHOW_HITS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_noauth"
type="list"
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
<fieldset name="integration" label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
<field
name="show_feed_link"
type="list"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="feed_summary"
type="list"
label="JGLOBAL_FEED_SUMMARY_LABEL"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_INTRO_TEXT</option>
<option value="1">JGLOBAL_FULL_TEXT</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,84 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2010 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
$lang = Factory::getLanguage();
$user = Factory::getUser();
$groups = $user->getAuthorisedViewLevels();
if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : ?>
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
<?php // Check whether category access level allows access to subcategories. ?>
<?php if (in_array($child->access, $groups)) : ?>
<?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) : ?>
<div class="com-content-category-blog__child">
<?php if ($lang->isRtl()) : ?>
<h3 class="page-header item-title">
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php else : ?>
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info">
<?php echo Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
<?php if ($child->description) : ?>
<div class="com-content-category-blog__description category-desc">
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<div class="com-content-category-blog__children collapse fade" id="category-<?php echo $child->id; ?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
echo $this->loadTemplate('children');
$this->category = $child->getParent();
$this->maxLevel++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif;

View File

@ -0,0 +1,89 @@
<?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\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;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<article class="card card-bg card-article card-article-redbrown">
<div class="card-body">
<div class="card-article-img d-none d-lg-block">
<?php if($introimg->image_intro =='') { ?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php } else {
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
}
?>
</div>
<div class="card-article-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_item_title_servizio', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?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; ?>
<p><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></p>
<?php if ($info == 1 || $info == 2) : ?>
<?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>
</div>
</article>

View File

@ -0,0 +1,87 @@
<?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\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;
use Joomla\CMS\Language\Text;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="card card-servizi card-bg card-icon rounded h-100">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" data-element="service-link">
<div class="card-body">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-pa"></use>
</svg>
<div class="card-icon-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_sottocategoria_item_title', $this->item); ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<small><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></small>
<?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>
</div>
</a>
</div>

View File

@ -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;
?>
<ol 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; ?>
</ol>

View File

@ -0,0 +1,49 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
use Joomla\CMS\Uri\Uri;
$url = Uri::root();
$app = Factory::getApplication();
$this->category->text = $this->category->description;
$app->triggerEvent('onContentPrepare', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$this->category->description = $this->category->text;
$results = $app->triggerEvent('onContentAfterTitle', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayTitle = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentBeforeDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$beforeDisplayContent = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentAfterDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayContent = trim(implode("\n", $results));
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
//echo json_encode($this->category);
//echo $this->category->parent_id;
$catactive = $this->category->title;
$imgdesc = $this->category->getParams()->get('image')
?>

View File

@ -0,0 +1,698 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="Pagina Didattica" option="paginadidattica">
<help key = "Menu_Item:_Category_Blog" />
<message>
<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
</message>
</layout>
<!-- Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldprefix="Joomla\Component\Categories\Administrator\Field"
>
<field
name="id"
type="modal_category"
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
extension="com_content"
required="true"
select="true"
new="true"
edit="true"
clear="true"
/>
<field
name="filter_tag"
type="tag"
label="JTAG"
multiple="true"
mode="nested"
custom="deny"
/>
</fieldset>
</fields>
<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
<fieldset name="basic" label="JGLOBAL_CATEGORY_OPTIONS">
<field
name="layout_type"
type="hidden"
default="blog"
/>
<field
name="show_category_title"
type="list"
label="JGLOBAL_SHOW_CATEGORY_TITLE"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description"
type="list"
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description_image"
type="list"
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="maxLevel"
type="list"
label="JGLOBAL_MAXLEVEL_LABEL"
description="JGLOBAL_MAXLEVEL_DESC"
useglobal="true"
validate="options"
>
<option value="-1">JALL</option>
<option value="0">JNONE</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="show_empty_categories"
type="list"
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_no_articles"
type="list"
label="COM_CONTENT_NO_ARTICLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category_heading_title_text"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_HEADING"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_subcat_desc"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_num_articles"
type="list"
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="advanced" label="JGLOBAL_BLOG_LAYOUT_OPTIONS" description="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL">
<field
name="num_leading_articles"
type="number"
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class_leading"
type="text"
label="JGLOBAL_BLOG_CLASS_LEADING"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_intro_articles"
type="number"
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class"
type="text"
label="JGLOBAL_BLOG_CLASS"
description="JGLOBAL_BLOG_CLASS_NOTE_DESC"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_columns"
type="number"
label="JGLOBAL_NUM_COLUMNS_LABEL"
filter="integer"
parentclass="stack span-1-inline"
useglobal="true"
/>
<field
name="multi_column_order"
type="list"
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
parentclass="stack span-2-inline"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_BLOG_DOWN_OPTION</option>
<option value="1">JGLOBAL_BLOG_ACROSS_OPTION</option>
</field>
<field
name="num_links"
type="number"
label="JGLOBAL_NUM_LINKS_LABEL"
filter="integer"
parentclass="stack span-1"
useglobal="true"
/>
<field
name="show_featured"
type="list"
label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="show">JSHOW</option>
<option value="hide">JHIDE</option>
<option value="only">JONLY</option>
</field>
<field
name="link_intro_image"
type="list"
label="JGLOBAL_LINKED_INTRO_IMAGE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_subcategory_content"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNONE</option>
<option value="-1">JALL</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="orderby_pri"
type="list"
label="JGLOBAL_CATEGORY_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2"
>
<option value="none">JGLOBAL_NO_ORDER</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
</field>
<field
name="orderby_sec"
type="list"
label="JGLOBAL_ARTICLE_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="front">COM_CONTENT_FEATURED_ORDER</option>
<option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
<option value="date">JGLOBAL_OLDEST_FIRST</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
<option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
<option value="hits" requires="hits">JGLOBAL_MOST_HITS</option>
<option value="rhits" requires="hits">JGLOBAL_LEAST_HITS</option>
<option value="random">JGLOBAL_RANDOM_ORDER</option>
<option value="order">JGLOBAL_ORDERING</option>
<option value="rorder">JGLOBAL_REVERSE_ORDERING</option>
<option value="vote" requires="vote">JGLOBAL_VOTES_DESC</option>
<option value="rvote" requires="vote">JGLOBAL_VOTES_ASC</option>
<option value="rank" requires="vote">JGLOBAL_RATINGS_DESC</option>
<option value="rrank" requires="vote">JGLOBAL_RATINGS_ASC</option>
</field>
<field
name="order_date"
type="list"
label="JGLOBAL_ORDERING_DATE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="created">JGLOBAL_CREATED</option>
<option value="modified">JGLOBAL_MODIFIED</option>
<option value="published">JPUBLISHED</option>
<option value="unpublished">JUNPUBLISHED</option>
</field>
<field
name="show_pagination"
type="list"
label="JGLOBAL_PAGINATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
<option value="2">JGLOBAL_AUTO</option>
</field>
<field
name="show_pagination_results"
type="list"
label="JGLOBAL_PAGINATION_RESULTS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
addfieldprefix="Joomla\Component\Content\Administrator\Field"
>
<field
name="article_layout"
type="componentlayout"
label="JGLOBAL_FIELD_LAYOUT_LABEL"
description="JGLOBAL_FIELD_LAYOUT_DESC"
class="form-select"
menuitems="true"
extension="com_content"
view="article"
/>
<field
name="show_title"
type="list"
label="JGLOBAL_SHOW_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_titles"
type="list"
label="JGLOBAL_LINKED_TITLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_intro"
type="list"
label="JGLOBAL_SHOW_INTRO_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="info_block_position"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
</field>
<field
name="info_block_show_title"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_category"
type="list"
label="JGLOBAL_LINK_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_parent_category"
type="list"
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_parent_category"
type="list"
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_associations"
type="assoc"
label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
useglobal="true"
class="form-select-color-state"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_author"
type="list"
label="JGLOBAL_SHOW_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_author"
type="list"
label="JGLOBAL_LINK_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_create_date"
type="list"
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_modify_date"
type="list"
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_publish_date"
type="list"
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_item_navigation"
type="list"
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_vote"
type="votelist"
label="JGLOBAL_SHOW_VOTE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore"
type="list"
label="JGLOBAL_SHOW_READMORE_LABEL"
description="JGLOBAL_SHOW_READMORE_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore_title"
type="list"
label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_hits"
type="list"
label="JGLOBAL_SHOW_HITS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_noauth"
type="list"
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
<fieldset name="integration" label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
<field
name="show_feed_link"
type="list"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="feed_summary"
type="list"
label="JGLOBAL_FEED_SUMMARY_LABEL"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_INTRO_TEXT</option>
<option value="1">JGLOBAL_FULL_TEXT</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,86 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
use Joomla\CMS\Uri\Uri;
$url = Uri::root();
$app = Factory::getApplication();
$this->category->text = $this->category->description;
$app->triggerEvent('onContentPrepare', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$this->category->description = $this->category->text;
$results = $app->triggerEvent('onContentAfterTitle', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayTitle = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentBeforeDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$beforeDisplayContent = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentAfterDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayContent = trim(implode("\n", $results));
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
//echo json_encode($this->category);
//echo $this->category->parent_id;
$catactive = $this->category->title;
$imgdesc = $this->category->getParams()->get('image');
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<section class="section bg-white py-5 position-relative d-flex align-items-center overflow-hidden section-hero">
<div class="container">
<div class="row align-items-center">
<div class="col-md-5 text-center">
<div class="hero-title">
<?php if ($this->params->get('show_category_title', 1)) : ?>
<small><?php echo $this->category->title; ?></small>
<?php endif; ?>
<?php if ($this->params->get('show_page_heading')) : ?>
<small><?php echo $this->escape($this->params->get('page_heading')); ?> </small>
<?php endif; ?>
<?php if ($this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<h1>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo strip_tags($this->category->description); ?>
<?php endif; ?>
</h1>
<?php endif; ?>
</div>
</div>
</div>
<?php if ($imgdesc !=''): ?>
<div class="title-img" <?php echo LayoutHelper::render('joomla.html.bgimage', ['src' => $this->category->getParams()->get('image'),]); ?>></div>
<?php else: ?>
<div class="title-img" style="background-image: url('<?= $baseImagePath ?>imgsegnaposto.jpg')"></div>
<?php endif; ?>
</div>
</section>
<?php echo $afterDisplayTitle; ?>
<?php echo $beforeDisplayContent; ?>
<?php echo $afterDisplayContent; ?>

View File

@ -0,0 +1,698 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="Pagina Scuola" option="scuola">
<help key = "Menu_Item:_Category_Blog" />
<message>
<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
</message>
</layout>
<!-- Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldprefix="Joomla\Component\Categories\Administrator\Field"
>
<field
name="id"
type="modal_category"
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
extension="com_content"
required="true"
select="true"
new="true"
edit="true"
clear="true"
/>
<field
name="filter_tag"
type="tag"
label="JTAG"
multiple="true"
mode="nested"
custom="deny"
/>
</fieldset>
</fields>
<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
<fieldset name="basic" label="JGLOBAL_CATEGORY_OPTIONS">
<field
name="layout_type"
type="hidden"
default="blog"
/>
<field
name="show_category_title"
type="list"
label="JGLOBAL_SHOW_CATEGORY_TITLE"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description"
type="list"
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_description_image"
type="list"
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="maxLevel"
type="list"
label="JGLOBAL_MAXLEVEL_LABEL"
description="JGLOBAL_MAXLEVEL_DESC"
useglobal="true"
validate="options"
>
<option value="-1">JALL</option>
<option value="0">JNONE</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="show_empty_categories"
type="list"
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_no_articles"
type="list"
label="COM_CONTENT_NO_ARTICLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category_heading_title_text"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_HEADING"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_subcat_desc"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_num_articles"
type="list"
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_cat_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="advanced" label="JGLOBAL_BLOG_LAYOUT_OPTIONS" description="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL">
<field
name="num_leading_articles"
type="number"
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class_leading"
type="text"
label="JGLOBAL_BLOG_CLASS_LEADING"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_intro_articles"
type="number"
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
filter="integer"
useglobal="true"
parentclass="stack span-1"
/>
<field
name="blog_class"
type="text"
label="JGLOBAL_BLOG_CLASS"
description="JGLOBAL_BLOG_CLASS_NOTE_DESC"
parentclass="stack span-2-inline"
useglobal="true"
validate="CssIdentifier"
/>
<field
name="num_columns"
type="number"
label="JGLOBAL_NUM_COLUMNS_LABEL"
filter="integer"
parentclass="stack span-1-inline"
useglobal="true"
/>
<field
name="multi_column_order"
type="list"
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
parentclass="stack span-2-inline"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_BLOG_DOWN_OPTION</option>
<option value="1">JGLOBAL_BLOG_ACROSS_OPTION</option>
</field>
<field
name="num_links"
type="number"
label="JGLOBAL_NUM_LINKS_LABEL"
filter="integer"
parentclass="stack span-1"
useglobal="true"
/>
<field
name="show_featured"
type="list"
label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="show">JSHOW</option>
<option value="hide">JHIDE</option>
<option value="only">JONLY</option>
</field>
<field
name="link_intro_image"
type="list"
label="JGLOBAL_LINKED_INTRO_IMAGE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_subcategory_content"
type="list"
label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JNONE</option>
<option value="-1">JALL</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field
name="orderby_pri"
type="list"
label="JGLOBAL_CATEGORY_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2"
>
<option value="none">JGLOBAL_NO_ORDER</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
</field>
<field
name="orderby_sec"
type="list"
label="JGLOBAL_ARTICLE_ORDER_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="front">COM_CONTENT_FEATURED_ORDER</option>
<option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
<option value="date">JGLOBAL_OLDEST_FIRST</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
<option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
<option value="hits" requires="hits">JGLOBAL_MOST_HITS</option>
<option value="rhits" requires="hits">JGLOBAL_LEAST_HITS</option>
<option value="random">JGLOBAL_RANDOM_ORDER</option>
<option value="order">JGLOBAL_ORDERING</option>
<option value="rorder">JGLOBAL_REVERSE_ORDERING</option>
<option value="vote" requires="vote">JGLOBAL_VOTES_DESC</option>
<option value="rvote" requires="vote">JGLOBAL_VOTES_ASC</option>
<option value="rank" requires="vote">JGLOBAL_RATINGS_DESC</option>
<option value="rrank" requires="vote">JGLOBAL_RATINGS_ASC</option>
</field>
<field
name="order_date"
type="list"
label="JGLOBAL_ORDERING_DATE_LABEL"
useglobal="true"
validate="options"
parentclass="stack span-2-inline"
>
<option value="created">JGLOBAL_CREATED</option>
<option value="modified">JGLOBAL_MODIFIED</option>
<option value="published">JPUBLISHED</option>
<option value="unpublished">JUNPUBLISHED</option>
</field>
<field
name="show_pagination"
type="list"
label="JGLOBAL_PAGINATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
<option value="2">JGLOBAL_AUTO</option>
</field>
<field
name="show_pagination_results"
type="list"
label="JGLOBAL_PAGINATION_RESULTS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
parentclass="stack span-1-inline"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
addfieldprefix="Joomla\Component\Content\Administrator\Field"
>
<field
name="article_layout"
type="componentlayout"
label="JGLOBAL_FIELD_LAYOUT_LABEL"
description="JGLOBAL_FIELD_LAYOUT_DESC"
class="form-select"
menuitems="true"
extension="com_content"
view="article"
/>
<field
name="show_title"
type="list"
label="JGLOBAL_SHOW_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_titles"
type="list"
label="JGLOBAL_LINKED_TITLES_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_intro"
type="list"
label="JGLOBAL_SHOW_INTRO_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="info_block_position"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
</field>
<field
name="info_block_show_title"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_category"
type="list"
label="JGLOBAL_LINK_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_parent_category"
type="list"
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_parent_category"
type="list"
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_associations"
type="assoc"
label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
useglobal="true"
class="form-select-color-state"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_author"
type="list"
label="JGLOBAL_SHOW_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_author"
type="list"
label="JGLOBAL_LINK_AUTHOR_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_create_date"
type="list"
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_modify_date"
type="list"
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_publish_date"
type="list"
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_item_navigation"
type="list"
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_vote"
type="votelist"
label="JGLOBAL_SHOW_VOTE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore"
type="list"
label="JGLOBAL_SHOW_READMORE_LABEL"
description="JGLOBAL_SHOW_READMORE_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_readmore_title"
type="list"
label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_hits"
type="list"
label="JGLOBAL_SHOW_HITS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_noauth"
type="list"
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
<fieldset name="integration" label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
<field
name="show_feed_link"
type="list"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="feed_summary"
type="list"
label="JGLOBAL_FEED_SUMMARY_LABEL"
useglobal="true"
validate="options"
>
<option value="0">JGLOBAL_INTRO_TEXT</option>
<option value="1">JGLOBAL_FULL_TEXT</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,84 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2010 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
$lang = Factory::getLanguage();
$user = Factory::getUser();
$groups = $user->getAuthorisedViewLevels();
if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : ?>
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
<?php // Check whether category access level allows access to subcategories. ?>
<?php if (in_array($child->access, $groups)) : ?>
<?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) : ?>
<div class="com-content-category-blog__child">
<?php if ($lang->isRtl()) : ?>
<h3 class="page-header item-title">
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php else : ?>
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info">
<?php echo Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
<?php if ($child->description) : ?>
<div class="com-content-category-blog__description category-desc">
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<div class="com-content-category-blog__children collapse fade" id="category-<?php echo $child->id; ?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
echo $this->loadTemplate('children');
$this->category = $child->getParent();
$this->maxLevel++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif;

View File

@ -0,0 +1,89 @@
<?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\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;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<article class="card card-bg card-article card-article-redbrown">
<div class="card-body">
<div class="card-article-img d-none d-lg-block">
<?php if($introimg->image_intro ==''){ ?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid"/></a></figure>
<?php } else{
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
}
?>
</div>
<div class="card-article-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_item_title_servizio', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?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; ?>
<p><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></p>
<?php if ($info == 1 || $info == 2) : ?>
<?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>
</div>
</article>

View File

@ -0,0 +1,87 @@
<?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\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;
use Joomla\CMS\Language\Text;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $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');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
$introimg = json_decode($this->item->images);
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="card card-servizi card-bg card-icon rounded h-100">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" data-element="service-link">
<div class="card-body">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-pa"></use>
</svg>
<div class="card-icon-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_sottocategoria_item_title', $this->item); ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<small><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></small>
<?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>
</div>
</a>
</div>

View File

@ -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;
?>
<ol 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; ?>
</ol>

View File

@ -0,0 +1,183 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2009 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
->useScript('form.validate')
->useScript('com_content.form-edit');
$this->tab_name = 'com-content-form';
$this->ignore_fieldsets = ['image-intro', 'image-full', 'jmetadata', 'item_associations'];
$this->useCoreUI = true;
// Create shortcut to parameters.
$params = $this->state->get('params');
// This checks if the editor config options have ever been saved. If they haven't they will fall back to the original settings
if (!$params->exists('show_publishing_options')) {
$params->set('show_urls_images_frontend', '0');
}
?>
<div class="container">
<div class="edit item-page">
<?php if ($params->get('show_page_heading')) : ?>
<div class="page-header">
<h1>
<?php echo $this->escape($params->get('page_heading')); ?>
</h1>
</div>
<?php endif; ?>
<form action="<?php echo Route::_('index.php?option=com_content&a_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical">
<fieldset>
<?php echo HTMLHelper::_('uitab.startTabSet', $this->tab_name, ['active' => 'editor', 'recall' => true, 'breakpoint' => 768]); ?>
<?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'editor', Text::_('COM_CONTENT_ARTICLE_CONTENT')); ?>
<?php echo $this->form->renderField('title'); ?>
<?php if (is_null($this->item->id)) : ?>
<?php echo $this->form->renderField('alias'); ?>
<?php endif; ?>
<?php echo $this->form->renderField('articletext'); ?>
<?php if ($this->captchaEnabled) : ?>
<?php echo $this->form->renderField('captcha'); ?>
<?php endif; ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php if ($params->get('show_urls_images_frontend')) : ?>
<?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'images', Text::_('COM_CONTENT_IMAGES_AND_URLS')); ?>
<?php echo $this->form->renderField('image_intro', 'images'); ?>
<?php echo $this->form->renderField('image_intro_alt', 'images'); ?>
<?php echo $this->form->renderField('image_intro_alt_empty', 'images'); ?>
<?php echo $this->form->renderField('image_intro_caption', 'images'); ?>
<?php echo $this->form->renderField('float_intro', 'images'); ?>
<?php echo $this->form->renderField('image_fulltext', 'images'); ?>
<?php echo $this->form->renderField('image_fulltext_alt', 'images'); ?>
<?php echo $this->form->renderField('image_fulltext_alt_empty', 'images'); ?>
<?php echo $this->form->renderField('image_fulltext_caption', 'images'); ?>
<?php echo $this->form->renderField('float_fulltext', 'images'); ?>
<?php echo $this->form->renderField('urla', 'urls'); ?>
<?php echo $this->form->renderField('urlatext', 'urls'); ?>
<div class="control-group">
<div class="controls">
<?php echo $this->form->getInput('targeta', 'urls'); ?>
</div>
</div>
<?php echo $this->form->renderField('urlb', 'urls'); ?>
<?php echo $this->form->renderField('urlbtext', 'urls'); ?>
<div class="control-group">
<div class="controls">
<?php echo $this->form->getInput('targetb', 'urls'); ?>
</div>
</div>
<?php echo $this->form->renderField('urlc', 'urls'); ?>
<?php echo $this->form->renderField('urlctext', 'urls'); ?>
<div class="control-group">
<div class="controls">
<?php echo $this->form->getInput('targetc', 'urls'); ?>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
<?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'publishing', Text::_('COM_CONTENT_PUBLISHING')); ?>
<?php echo $this->form->renderField('transition'); ?>
<?php echo $this->form->renderField('state'); ?>
<?php echo $this->form->renderField('catid'); ?>
<?php echo $this->form->renderField('tags'); ?>
<?php echo $this->form->renderField('note'); ?>
<?php if ($params->get('save_history', 0)) : ?>
<?php echo $this->form->renderField('version_note'); ?>
<?php endif; ?>
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
<?php echo $this->form->renderField('created_by_alias'); ?>
<?php endif; ?>
<?php if ($this->item->params->get('access-change')) : ?>
<?php echo $this->form->renderField('featured'); ?>
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
<?php echo $this->form->renderField('featured_up'); ?>
<?php echo $this->form->renderField('featured_down'); ?>
<?php echo $this->form->renderField('publish_up'); ?>
<?php echo $this->form->renderField('publish_down'); ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->form->renderField('access'); ?>
<?php if (is_null($this->item->id)) : ?>
<div class="control-group">
<div class="control-label">
</div>
<div class="controls">
<?php echo Text::_('COM_CONTENT_ORDERING'); ?>
</div>
</div>
<?php endif; ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php if (Multilanguage::isEnabled()) : ?>
<?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'language', Text::_('JFIELD_LANGUAGE_LABEL')); ?>
<?php echo $this->form->renderField('language'); ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php else : ?>
<?php echo $this->form->renderField('language'); ?>
<?php endif; ?>
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'metadata', Text::_('COM_CONTENT_METADATA')); ?>
<?php echo $this->form->renderField('metadesc'); ?>
<?php echo $this->form->renderField('metakey'); ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>
<input type="hidden" name="task" value="">
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>">
<?php echo HTMLHelper::_('form.token'); ?>
</fieldset>
<div class="mb-2">
<button type="button" class="btn btn-primary" data-submit-task="article.apply">
<span class="icon-check" aria-hidden="true"></span>
<?php echo Text::_('JSAVE'); ?>
</button>
<button type="button" class="btn btn-primary" data-submit-task="article.save">
<span class="icon-check" aria-hidden="true"></span>
<?php echo Text::_('JSAVEANDCLOSE'); ?>
</button>
<?php if ($this->showSaveAsCopy) : ?>
<button type="button" class="btn btn-primary" data-submit-task="article.save2copy">
<span class="icon-copy" aria-hidden="true"></span>
<?php echo Text::_('JSAVEASCOPY'); ?>
</button>
<?php endif; ?>
<button type="button" class="btn btn-danger" data-submit-task="article.cancel">
<span class="icon-times" aria-hidden="true"></span>
<?php echo Text::_('JCANCEL'); ?>
</button>
<?php if ($params->get('save_history', 0) && $this->item->id) : ?>
<?php echo $this->form->getInput('contenthistory'); ?>
<?php endif; ?>
</div>
</form>
</div>
</div>

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<layout title="COM_CONTENT_FORM_VIEW_DEFAULT_TITLE" option="COM_CONTENT_FORM_VIEW_DEFAULT_OPTION">
<help
key = "Menu_Item:_Create_Article"
/>
<message>
<![CDATA[COM_CONTENT_FORM_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="params">
<fieldset name="basic"
addfieldprefix="Joomla\Component\Categories\Administrator\Field"
>
<field
name="enable_category"
type="radio"
label="COM_CONTENT_CREATE_ARTICLE_CATEGORY_LABEL"
layout="joomla.form.field.radio.switcher"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="catid"
type="modal_category"
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
extension="com_content"
select="true"
new="true"
edit="true"
clear="true"
showon="enable_category:1"
/>
<field
name="redirect_menuitem"
type="modal_menu"
label="COM_CONTENT_CREATE_ARTICLE_REDIRECTMENU_LABEL"
description="COM_CONTENT_CREATE_ARTICLE_REDIRECTMENU_DESC"
>
<option value="">JDEFAULT</option>
</field>
<field
name="custom_cancel_redirect"
type="radio"
label="COM_CONTENT_CREATE_ARTICLE_CUSTOM_CANCEL_REDIRECT_LABEL"
description="COM_CONTENT_CREATE_ARTICLE_CUSTOM_CANCEL_REDIRECT_DESC"
layout="joomla.form.field.radio.switcher"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="cancel_redirect_menuitem"
type="modal_menu"
label="COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_LABEL"
description="COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_DESC"
showon="custom_cancel_redirect:1"
>
<option value="">JDEFAULT</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,39 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_finder
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$this->document->getWebAssetManager()
->useStyle('com_finder.finder')
->useScript('com_finder.finder');
?>
<div class="container py-5">
<div class="com-finder finder">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1>
<?php if ($this->escape($this->params->get('page_heading'))) : ?>
<?php echo $this->escape($this->params->get('page_heading')); ?>
<?php else : ?>
<?php echo $this->escape($this->params->get('page_title')); ?>
<?php endif; ?>
</h1>
<?php endif; ?>
<div id="search-form" class="com-finder__form">
<?php echo $this->loadTemplate('form'); ?>
</div>
<?php // Load the search results layout if we are performing a search. ?>
<?php if ($this->query->search === true) : ?>
<div id="search-results" class="com-finder__results">
<?php echo $this->loadTemplate('results'); ?>
</div>
<?php endif; ?>
</div>
</div>

View File

@ -0,0 +1,77 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_finder
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
/*
* This segment of code sets up the autocompleter.
*/
if ($this->params->get('show_autosuggest', 1)) {
$this->document->getWebAssetManager()->usePreset('awesomplete');
$this->document->addScriptOptions('finder-search', ['url' => Route::_('index.php?option=com_finder&task=suggestions.suggest&format=json&tmpl=component', false)]);
}
?>
<form action="<?php echo Route::_($this->query->toUri()); ?>" method="get" class="js-finder-searchform">
<?php echo $this->getFields(); ?>
<fieldset class="com-finder__search word mb-3 d-flex">
<legend class="com-finder__search-legend visually-hidden">
<?php echo Text::_('COM_FINDER_SEARCH_FORM_LEGEND'); ?>
</legend>
<input type="text" name="q" id="q" class="js-finder-search-query form-control" value="<?php echo $this->escape($this->query->input); ?>">
<div class="input-group-append">
<button type="submit" class="btn btn-primary">
<span class="icon-search icon-white" aria-hidden="true"></span>
<?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?>
</button>
</div>
<?php if ($this->params->get('show_advanced', 1)) : ?>
<?php HTMLHelper::_('bootstrap.collapse'); ?>
<button class="btn btn-secondary" type="button" data-bs-toggle="collapse" data-bs-target="#advancedSearch" aria-expanded="<?php echo ($this->params->get('expand_advanced', 0) ? 'true' : 'false'); ?>">
<span class="icon-search-plus" aria-hidden="true"></span>
<?php echo Text::_('COM_FINDER_ADVANCED_SEARCH_TOGGLE'); ?></button>
<?php endif; ?>
</fieldset>
<?php if ($this->params->get('show_advanced', 1)) : ?>
<fieldset id="advancedSearch" class="com-finder__advanced js-finder-advanced collapse<?php if ($this->params->get('expand_advanced', 0)) {
echo ' show';
} ?>">
<legend class="com-finder__search-advanced visually-hidden">
<?php echo Text::_('COM_FINDER_SEARCH_ADVANCED_LEGEND'); ?>
</legend>
<?php if ($this->params->get('show_advanced_tips', 1)) : ?>
<div class="com-finder__tips card card-outline-secondary mb-3">
<div class="card-body">
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_INTRO'); ?>
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_AND'); ?>
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_NOT'); ?>
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_OR'); ?>
<?php if ($this->params->get('tuplecount', 1) > 1) : ?>
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_PHRASE'); ?>
<?php endif; ?>
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_OUTRO'); ?>
</div>
</div>
<?php endif; ?>
<div id="finder-filter-window" class="com-finder__filter">
<?php echo HTMLHelper::_('filter.select', $this->query, $this->params); ?>
</div>
</fieldset>
<?php endif; ?>
</form>

View File

@ -0,0 +1,126 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_finder
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Finder\Administrator\Helper\LanguageHelper;
use Joomla\Component\Finder\Administrator\Indexer\Helper;
use Joomla\Component\Finder\Administrator\Indexer\Taxonomy;
use Joomla\String\StringHelper;
$user = Factory::getApplication()->getIdentity();
$show_description = $this->params->get('show_description', 1);
if ($show_description) {
// Calculate number of characters to display around the result
$term_length = StringHelper::strlen($this->query->input);
$desc_length = $this->params->get('description_length', 255);
$pad_length = $term_length < $desc_length ? (int) floor(($desc_length - $term_length) / 2) : 0;
// Make sure we highlight term both in introtext and fulltext
$full_description = $this->result->description;
if (!empty($this->result->summary) && !empty($this->result->body)) {
$full_description = Helper::parse($this->result->summary . $this->result->body);
}
// Find the position of the search term
$pos = $term_length ? StringHelper::strpos(StringHelper::strtolower($full_description), StringHelper::strtolower($this->query->input)) : false;
// Find a potential start point
$start = ($pos && $pos > $pad_length) ? $pos - $pad_length : 0;
// Find a space between $start and $pos, start right after it.
$space = StringHelper::strpos($full_description, ' ', $start > 0 ? $start - 1 : 0);
$start = ($space && $space < $pos) ? $space + 1 : $start;
$description = HTMLHelper::_('string.truncate', StringHelper::substr($full_description, $start), $desc_length, true);
}
$showImage = $this->params->get('show_image', 0);
$imageClass = $this->params->get('image_class', '');
$extraAttr = [];
if ($showImage && !empty($this->result->imageUrl) && $imageClass !== '') {
$extraAttr['class'] = $imageClass;
}
$icon = '';
if (!empty($this->result->mime)) {
$icon = '<span class="icon-file-' . $this->result->mime . '" aria-hidden="true"></span> ';
}
$show_url = '';
if ($this->params->get('show_url', 1)) {
$show_url = '<cite class="result__title-url">' . $this->baseUrl . Route::_($this->result->cleanURL) . '</cite>';
}
?>
<li class="result__item">
<?php if ($showImage && isset($this->result->imageUrl)) : ?>
<figure class="<?php echo htmlspecialchars($imageClass, ENT_COMPAT, 'UTF-8'); ?> result__image">
<?php if ($this->params->get('link_image') && $this->result->route) : ?>
<a href="<?php echo Route::_($this->result->route); ?>">
<?php echo HTMLHelper::_('image', $this->result->imageUrl, $this->result->imageAlt, $extraAttr); ?>
</a>
<?php else : ?>
<?php echo HTMLHelper::_('image', $this->result->imageUrl, $this->result->imageAlt, $extraAttr); ?>
<?php endif; ?>
</figure>
<?php endif; ?>
<p class="result__title">
<?php if ($this->result->route) : ?>
<?php echo HTMLHelper::link(
Route::_($this->result->route),
'<span class="result__title-text">' . $icon . $this->result->title . '</span>' . $show_url,
[
'class' => 'result__title-link'
]
); ?>
<?php else : ?>
<?php echo $this->result->title; ?>
<?php endif; ?>
</p>
<?php if ($show_description && $description !== '') : ?>
<p class="result__description">
<?php if ($this->result->start_date && $this->params->get('show_date', 1)) : ?>
<time class="result__date" datetime="<?php echo HTMLHelper::_('date', $this->result->start_date, 'c'); ?>">
<?php echo HTMLHelper::_('date', $this->result->start_date, Text::_('DATE_FORMAT_LC3')); ?>
</time>
<?php endif; ?>
<?php echo $description; ?>
</p>
<?php endif; ?>
<?php $taxonomies = $this->result->getTaxonomy(); ?>
<?php if (count($taxonomies) && $this->params->get('show_taxonomy', 1)) : ?>
<ul class="result__taxonomy">
<?php foreach ($taxonomies as $type => $taxonomy) : ?>
<?php $branch = Taxonomy::getBranch($type); ?>
<?php if ($branch->state == 1 && in_array($branch->access, $user->getAuthorisedViewLevels())) : ?>
<?php $taxonomy_text = []; ?>
<?php foreach ($taxonomy as $node) : ?>
<?php if ($node->state == 1 && in_array($node->access, $user->getAuthorisedViewLevels())) : ?>
<?php $taxonomy_text[] = $node->title; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php if (count($taxonomy_text)) : ?>
<li class="result__taxonomy-item result__taxonomy--<?php echo $type; ?>">
<span><?php echo Text::_(LanguageHelper::branchSingular($type)); ?>:</span>
<?php echo Text::_(LanguageHelper::branchSingular(implode(',', $taxonomy_text))); ?>
</li>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>

View File

@ -0,0 +1,89 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_finder
*
* @copyright (C) 2011 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\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
?>
<?php // Display the suggested search if it is different from the current search. ?>
<?php if (($this->suggested && $this->params->get('show_suggested_query', 1)) || ($this->explained && $this->params->get('show_explained_query', 1))) : ?>
<div id="search-query-explained" class="com-finder__explained">
<?php // Display the suggested search query. ?>
<?php if ($this->suggested && $this->params->get('show_suggested_query', 1)) : ?>
<?php // Replace the base query string with the suggested query string. ?>
<?php $uri = Uri::getInstance($this->query->toUri()); ?>
<?php $uri->setVar('q', $this->suggested); ?>
<?php // Compile the suggested query link. ?>
<?php $linkUrl = Route::_($uri->toString(['path', 'query'])); ?>
<?php $link = '<a href="' . $linkUrl . '">' . $this->escape($this->suggested) . '</a>'; ?>
<?php echo Text::sprintf('COM_FINDER_SEARCH_SIMILAR', $link); ?>
<?php elseif ($this->explained && $this->params->get('show_explained_query', 1)) : ?>
<?php // Display the explained search query. ?>
<p role="alert">
<?php echo Text::plural('COM_FINDER_QUERY_RESULTS', $this->total, $this->explained); ?>
</p>
<?php endif; ?>
</div>
<?php endif; ?>
<?php // Display the 'no results' message and exit the template. ?>
<?php if (($this->total === 0) || ($this->total === null)) : ?>
<div id="search-result-empty" class="com-finder__empty">
<h2><?php echo Text::_('COM_FINDER_SEARCH_NO_RESULTS_HEADING'); ?></h2>
<?php $multilang = Factory::getApplication()->getLanguageFilter() ? '_MULTILANG' : ''; ?>
<p><?php echo Text::sprintf('COM_FINDER_SEARCH_NO_RESULTS_BODY' . $multilang, $this->escape($this->query->input)); ?></p>
</div>
<?php // Exit this template. ?>
<?php return; ?>
<?php endif; ?>
<?php // Activate the highlighter if enabled. ?>
<?php if (!empty($this->query->highlight) && $this->params->get('highlight_terms', 1)) : ?>
<?php
$this->document->getWebAssetManager()->useScript('highlight');
$this->document->addScriptOptions(
'highlight',
[[
'class' => 'js-highlight',
'highLight' => $this->query->highlight,
]]
);
?>
<?php endif; ?>
<?php // Display a list of results ?>
<ol id="search-result-list" class="js-highlight com-finder__results-list" start="<?php echo (int) $this->pagination->limitstart + 1; ?>">
<?php $this->baseUrl = Uri::getInstance()->toString(['scheme', 'host', 'port']); ?>
<?php foreach ($this->results as $i => $result) : ?>
<?php $this->result = &$result; ?>
<?php $this->result->counter = $i + 1; ?>
<?php $layout = $this->getLayoutFile($this->result->layout); ?>
<?php echo $this->loadTemplate($layout); ?>
<?php endforeach; ?>
</ol>
<?php // Display the pagination ?>
<div class="com-finder__navigation search-pagination">
<?php if ($this->params->get('show_pagination', 1) > 0) : ?>
<div class="com-finder__pagination w-100">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_pagination_results', 1) > 0) : ?>
<div class="com-finder__counter search-pages-counter">
<?php // Prepare the pagination string. Results X - Y of Z ?>
<?php $start = (int) $this->pagination->limitstart + 1; ?>
<?php $total = (int) $this->pagination->total; ?>
<?php $limit = (int) $this->pagination->limit * $this->pagination->pagesCurrent; ?>
<?php $limit = (int) ($limit > $total ? $total : $limit); ?>
<?php echo Text::sprintf('COM_FINDER_SEARCH_RESULTS_OF', $start, $limit, $total); ?>
</div>
<?php endif; ?>
</div>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_tags
*
* @copyright (C) 2013 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\HTML\HTMLHelper;
// Note that there are certain parts of this layout used only when there is exactly one tag.
$isSingleTag = count($this->item) === 1;
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
?>
<section class="section section-padding py-0 bg-bluelectric section-tabs-bg">
<div class="container">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<div class="title-large pt-5">
<h1 class="h3">La didattica</h1>
<h2 class="h4 text-white label-didattica">la nostra offerta formativa</h2>
</div>
<?php // We only show a tag description if there is a single tag. ?>
<?php if (count($this->item) === 1 && ($this->params->get('tag_list_show_tag_image', 1) || $this->params->get('tag_list_show_tag_description', 1))) : ?>
<div class="com-tags-tag__description category-desc">
<?php $images = json_decode($this->item[0]->images); ?>
<?php if ($this->params->get('tag_list_show_tag_image', 1) == 1 && !empty($images->image_fulltext)) : ?>
<?php echo HTMLHelper::_('image', $images->image_fulltext, $images->image_fulltext_alt); ?>
<?php endif; ?>
<?php if ($this->params->get('tag_list_show_tag_description') == 1 && $this->item[0]->description) : ?>
<?php echo HTMLHelper::_('content.prepare', $this->item[0]->description, '', 'com_tags.tag'); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php // If there are multiple tags and a description or image has been supplied use that. ?>
<?php if ($this->params->get('tag_list_show_tag_description', 1) || $this->params->get('show_description_image', 1)) : ?>
<?php if ($this->params->get('show_description_image', 1) == 1 && $this->params->get('tag_list_image')) : ?>
<?php echo HTMLHelper::_('image', $this->params->get('tag_list_image'), empty($this->params->get('tag_list_image_alt')) && empty($this->params->get('tag_list_image_alt_empty')) ? false : $this->params->get('tag_list_image_alt')); ?>
<?php endif; ?>
<?php if ($this->params->get('tag_list_description', '') > '') : ?>
<?php echo HTMLHelper::_('content.prepare', $this->params->get('tag_list_description'), '', 'com_tags.tag'); ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('items'); ?>
<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-tags-tag__pagination 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>
</section>

View File

@ -0,0 +1,77 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_tags
*
* @copyright (C) 2013 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Tags\Site\Helper\RouteHelper;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_tags.tag-default');
// Get the user object.
$user = Factory::getUser();
// Check if user is allowed to add/edit based on tags permissions.
// Do we really have to make it so people can see unpublished tags???
$canEdit = $user->authorise('core.edit', 'com_tags');
$canCreate = $user->authorise('core.create', 'com_tags');
$canEditState = $user->authorise('core.edit.state', 'com_tags');
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<section class="bg-gray-light">
<div class="container">
<div class="row">
<div class="col-lg-10 offset-lg-1 pt84">
<?php if (empty($this->items)) : ?>
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_TAGS_NO_ITEMS'); ?>
</div>
<?php else : ?>
<?php foreach ($this->items as $i => $item) : ?>
<article class="card card-bg card-article card-article-redbrown">
<div class="card-body">
<div class="card-article-img d-none d-lg-block">
<?php $images = json_decode($item->core_images); ?>
<a href="<?php echo Route::_(RouteHelper::getItemRoute($item->content_item_id, $item->core_alias, $item->core_catid, $item->core_language, $item->type_alias, $item->router)); ?>">
<?php if($images->image_intro ==''): ?>
<figure>
<img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/>
</figure>
<?php else:?>
<?php echo HTMLHelper::_('image', $images->image_intro, $images->image_intro_alt); ?>
<?php endif; ?>
</a>
</div>
<div class="card-article-content">
<h2 class="h3">
<a href="<?php echo Route::_($item->link); ?>" aria-label="<?php echo $this->escape($item->core_title); ?>">
<?php echo $this->escape($item->core_title); ?>
</a>
</h2>
<p><?php echo HTMLHelper::_('string.truncate', $item->core_body, $this->params->get('tag_list_item_maximum_characters')); ?></p>
</div>
</div>
</article>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</div>
</section>

View File

@ -0,0 +1,139 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_tags
*
* @copyright (C) 2013 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Tags\Site\Helper\RouteHelper;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_tags.tag-default');
// Get the user object.
$user = Factory::getUser();
// Check if user is allowed to add/edit based on tags permissions.
// Do we really have to make it so people can see unpublished tags???
$canEdit = $user->authorise('core.edit', 'com_tags');
$canCreate = $user->authorise('core.create', 'com_tags');
$canEditState = $user->authorise('core.edit.state', 'com_tags');
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_TAGS_NO_ITEMS'); ?>
</div>
<?php else :
foreach ($this->items as $m => $item_tag) :
$db2 = Factory::getContainer()->get('DatabaseDriver');
$query2 = $db2->getQuery(true);
$query2->select($db2->quoteName(array('tagmap.content_item_id', 'tagmap.tag_id', 'tags.title')))
->from($db2->quoteName('#__contentitem_tag_map', "tagmap"))
->leftJoin($db2->quoteName("#__content", "content") . ' ON ' . $db2->quoteName("tagmap.content_item_id") . " = " . $db2->quoteName("content.id"))
->leftJoin($db2->quoteName("#__tags", "tags") . ' ON ' . $db2->quoteName("tags.id") . " = " . $db2->quoteName("tagmap.tag_id"))
->where($db2->quoteName('content.id') . ' = '. $item_tag->id);
$db2->setQuery($query2);
$items2 = $db2->loadObjectList();
$items3[$items2[0]->content_item_id]= $items2[0];
endforeach;
$tagOLD = '';
$arrray = [];
foreach($this->items as $articolo):
$arr_art[$items3[$articolo->id]->tag_id][] = $articolo;
endforeach;
?>
<div class="responsive-tabs responsive-tabs-aside r-tabs">
<div class="tabs-img">
<img class="img-fluid" src="<?= $baseImagePath ?>img-didattica.png" title="I cicli" alt="La didattica">
</div>
<div class="r-tabs-nav nav nav-tabs nav-tabs-vertical" id="nav-vertical-tab" role="tablist" aria-orientation="vertical">
<ul class="m-0 p-0">
<?php
$z1 = 0;
foreach($items3 as $tag):
if($tagOLD == $tag->tag_id){
continue;
}
?>
<li>
<a href="#nav-vertical-<?php echo $tag->tag_id; ?>" class="nav-link <?php if ($z1 == 0): ?>active<?php endif; ?>" id="nav-vertical-<?php echo $tag->tag_id; ?>-tab" data-bs-toggle="tab" role="tab" aria-controls="nav-vertical-<?php echo $tag->tag_id; ?>" aria-selected="false"><?php echo $tag->title; ?></a>
</li>
<?php
$tagOLD = $tag->tag_id;
$z1++;
endforeach;?>
</ul>
</div>
<div class="accordion-large accordion-wrapper responsive-tabs-wrapper">
<div class="pb-3 pb-lg-0">
<div class="tab-content" id="nav-vertical-tabContent">
<?php
$z2 = 0;
foreach($items3 as $tag):
/*if($tagOLD == $tag->tag_id){
continue;
} */
?>
<!--<h2><?php echo $tag->title; ?></h2>-->
<button class="btn bttabacc d-lg-none d-block" type="button" data-bs-toggle="collapse" data-bs-target="#nav-vertical-<?php echo $tag->tag_id; ?>" aria-expanded="false" aria-controls="nav-vertical-<?php echo $tag->tag_id; ?>">
<?php echo $tag->title; ?>
<svg class="icon icon-tab">
<use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use>
</svg>
</button>
<div class="collapse tab-pane <?php if ($z2 == 0): ?>active<?php endif; ?>" id="nav-vertical-<?php echo $tag->tag_id; ?>" role="tabpanel" aria-labelledby="nav-vertical-<?php echo $tag->tag_id; ?>-tab">
<div class="responsive-tabs-content accordion accordion-left-icon">
<?php foreach ($arr_art[$tag->tag_id] as $item) : ?>
<div class="accordion-large accordion-wrapper">
<div class="accordion-large-title accordion-header accordion-inactive">
<h3 class="mb-0">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapse<?php echo $item->id; ?>" aria-expanded="false" aria-controls="collapse1l">
<?php echo $this->escape($item->core_title); ?>
</button>
</h3>
</div>
<div id="collapse<?php echo $item->id; ?>" class="accordion-collapse collapse accordion-content" data-bs-parent="accordion<?php echo $tag->tag_id; ?>" role="region" aria-labelledby="heading1l">
<?php echo HTMLHelper::_('string.truncate', $item->core_body, $this->params->get('tag_list_item_maximum_characters')); ?>
<p>
<a href="<?php echo Route::_($item->link); ?>" class="btn">Per saperne di più</a>
</p>
</div>
</div>
<?php $tagOLD = $tag->tag_id ?>
<?php endforeach; ?>
</div>
</div>
</div>
<?php
$z2++;
endforeach;
?>
</div>
</div>
</div>
<?php endif; ?>

View File

@ -0,0 +1,58 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_tags
*
* @copyright (C) 2013 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\HTML\HTMLHelper;
// Note that there are certain parts of this layout used only when there is exactly one tag.
$n = count($this->items);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
?>
<div class="com-tags-tag-list tag-category">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<?php if ($this->params->get('show_tag_title', 1)) : ?>
<<?php echo $htag; ?>>
<?php echo HTMLHelper::_('content.prepare', $this->tags_title, '', 'com_tag.tag'); ?>
</<?php echo $htag; ?>>
<?php endif; ?>
<?php // We only show a tag description if there is a single tag. ?>
<?php if (count($this->item) === 1 && ($this->params->get('tag_list_show_tag_image', 1) || $this->params->get('tag_list_show_tag_description', 1))) : ?>
<div class="com-tags-tag-list__description category-desc">
<?php $images = json_decode($this->item[0]->images); ?>
<?php if ($this->params->get('tag_list_show_tag_image', 1) == 1 && !empty($images->image_fulltext)) : ?>
<?php echo HTMLHelper::_('image', $images->image_fulltext, ''); ?>
<?php endif; ?>
<?php if ($this->params->get('tag_list_show_tag_description') == 1 && $this->item[0]->description) : ?>
<?php echo HTMLHelper::_('content.prepare', $this->item[0]->description, '', 'com_tags.tag'); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php // If there are multiple tags and a description or image has been supplied use that. ?>
<?php if ($this->params->get('tag_list_show_tag_description', 1) || $this->params->get('show_description_image', 1)) : ?>
<?php if ($this->params->get('show_description_image', 1) == 1 && $this->params->get('tag_list_image')) : ?>
<?php echo HTMLHelper::_('image', $this->params->get('tag_list_image'), empty($this->params->get('tag_list_image_alt')) && empty($this->params->get('tag_list_image_alt_empty')) ? false : $this->params->get('tag_list_image_alt')); ?>
<?php endif; ?>
<?php if ($this->params->get('tag_list_description', '') > '') : ?>
<?php echo HTMLHelper::_('content.prepare', $this->params->get('tag_list_description'), '', 'com_tags.tag'); ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('items'); ?>
</div>

View File

@ -0,0 +1,133 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_tags
*
* @copyright (C) 2013 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_tags.tag-list');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
?>
<div class="com-tags-compact__items">
<form action="<?php echo htmlspecialchars(Uri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm" class="com-tags-tag-list__items">
<?php if ($this->params->get('filter_field')) : ?>
<div class="com-tags-tag__filter btn-group">
<label class="filter-search-lbl visually-hidden" for="filter-search">
<?php echo Text::_('COM_TAGS_TITLE_FILTER_LABEL'); ?>
</label>
<input
type="text"
name="filter-search"
id="filter-search"
value="<?php echo $this->escape($this->state->get('list.filter')); ?>"
class="inputbox" onchange="document.adminForm.submit();"
placeholder="<?php echo Text::_('COM_TAGS_TITLE_FILTER_LABEL'); ?>"
>
<button type="submit" name="filter_submit" class="btn btn-primary"><?php echo Text::_('JGLOBAL_FILTER_BUTTON'); ?></button>
<button type="reset" name="filter-clear-button" class="btn btn-secondary"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_pagination_limit')) : ?>
<div class="btn-group float-end">
<label for="limit" class="visually-hidden">
<?php echo Text::_('JGLOBAL_DISPLAY_NUM'); ?>
</label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<?php endif; ?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_TAGS_NO_ITEMS'); ?>
</div>
<?php else : ?>
<table class="com-tags-tag-list__category category table table-striped table-bordered table-hover">
<?php if ($this->params->get('show_headings')) : ?>
<thead>
<tr>
<th scope="col" id="categorylist_header_title">
<?php echo HTMLHelper::_('grid.sort', 'JGLOBAL_TITLE', 'c.core_title', $listDirn, $listOrder); ?>
</th>
<?php if ($date = $this->params->get('tag_list_show_date')) : ?>
<th scope="col" id="categorylist_header_date">
<?php if ($date === 'created') : ?>
<?php echo HTMLHelper::_('grid.sort', 'COM_TAGS_' . $date . '_DATE', 'c.core_created_time', $listDirn, $listOrder); ?>
<?php elseif ($date === 'modified') : ?>
<?php echo HTMLHelper::_('grid.sort', 'COM_TAGS_' . $date . '_DATE', 'c.core_modified_time', $listDirn, $listOrder); ?>
<?php elseif ($date === 'published') : ?>
<?php echo HTMLHelper::_('grid.sort', 'COM_TAGS_' . $date . '_DATE', 'c.core_publish_up', $listDirn, $listOrder); ?>
<?php endif; ?>
</th>
<?php endif; ?>
</tr>
</thead>
<?php endif; ?>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<?php if ($item->core_state == 0) : ?>
<tr class="system-unpublished cat-list-row<?php echo $i % 2; ?>">
<?php else : ?>
<tr class="cat-list-row<?php echo $i % 2; ?>" >
<?php endif; ?>
<th scope="row" class="list-title">
<?php if (($item->type_alias === 'com_users.category') || ($item->type_alias === 'com_banners.category')) : ?>
<?php echo $this->escape($item->core_title); ?>
<?php else : ?>
<a href="<?php echo Route::_($item->link); ?>">
<?php echo $this->escape($item->core_title); ?>
</a>
<?php endif; ?>
<?php if ($item->core_state == 0) : ?>
<span class="list-published badge bg-warning text-light">
<?php echo Text::_('JUNPUBLISHED'); ?>
</span>
<?php endif; ?>
</th>
<?php if ($this->params->get('tag_list_show_date')) : ?>
<td class="list-date">
<?php
echo HTMLHelper::_(
'date',
$item->displayDate,
$this->escape($this->params->get('date_format', Text::_('DATE_FORMAT_LC3')))
); ?>
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php // Add pagination links ?>
<?php if (($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-tags-tag-list__pagination 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; ?>
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>">
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>">
<input type="hidden" name="limitstart" value="">
<input type="hidden" name="task" value="">
</form>
</div>

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_tags
*
* @copyright (C) 2013 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\HTML\HTMLHelper;
// Note that there are certain parts of this layout used only when there is exactly one tag.
$isSingleTag = count($this->item) === 1;
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
?>
<section class="section section-padding py-0 bg-bluelectric section-tabs-bg">
<div class="container">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<div class="title-large pt-5">
<h1 class="h3">La didattica</h1>
<h2 class="h4 text-white label-didattica">la nostra offerta formativa</h2>
</div>
<?php // We only show a tag description if there is a single tag. ?>
<?php if (count($this->item) === 1 && ($this->params->get('tag_list_show_tag_image', 1) || $this->params->get('tag_list_show_tag_description', 1))) : ?>
<div class="com-tags-tag__description category-desc">
<?php $images = json_decode($this->item[0]->images); ?>
<?php if ($this->params->get('tag_list_show_tag_image', 1) == 1 && !empty($images->image_fulltext)) : ?>
<?php echo HTMLHelper::_('image', $images->image_fulltext, $images->image_fulltext_alt); ?>
<?php endif; ?>
<?php if ($this->params->get('tag_list_show_tag_description') == 1 && $this->item[0]->description) : ?>
<?php echo HTMLHelper::_('content.prepare', $this->item[0]->description, '', 'com_tags.tag'); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php // If there are multiple tags and a description or image has been supplied use that. ?>
<?php if ($this->params->get('tag_list_show_tag_description', 1) || $this->params->get('show_description_image', 1)) : ?>
<?php if ($this->params->get('show_description_image', 1) == 1 && $this->params->get('tag_list_image')) : ?>
<?php echo HTMLHelper::_('image', $this->params->get('tag_list_image'), empty($this->params->get('tag_list_image_alt')) && empty($this->params->get('tag_list_image_alt_empty')) ? false : $this->params->get('tag_list_image_alt')); ?>
<?php endif; ?>
<?php if ($this->params->get('tag_list_description', '') > '') : ?>
<?php echo HTMLHelper::_('content.prepare', $this->params->get('tag_list_description'), '', 'com_tags.tag'); ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('items'); ?>
<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-tags-tag__pagination 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>
</section>

View File

@ -0,0 +1,140 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_tags
*
* @copyright (C) 2013 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Tags\Site\Helper\RouteHelper;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_tags.tag-default');
// Get the user object.
$user = Factory::getUser();
// Check if user is allowed to add/edit based on tags permissions.
// Do we really have to make it so people can see unpublished tags???
$canEdit = $user->authorise('core.edit', 'com_tags');
$canCreate = $user->authorise('core.create', 'com_tags');
$canEditState = $user->authorise('core.edit.state', 'com_tags');
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_TAGS_NO_ITEMS'); ?>
</div>
<?php else :
foreach ($this->items as $m => $item_tag) :
$db2 = Factory::getContainer()->get('DatabaseDriver');
$query2 = $db2->getQuery(true);
$query2->select($db2->quoteName(array('tagmap.content_item_id', 'tagmap.tag_id', 'tags.title')))
->from($db2->quoteName('#__contentitem_tag_map', "tagmap"))
->leftJoin($db2->quoteName("#__content", "content") . ' ON ' . $db2->quoteName("tagmap.content_item_id") . " = " . $db2->quoteName("content.id"))
->leftJoin($db2->quoteName("#__tags", "tags") . ' ON ' . $db2->quoteName("tags.id") . " = " . $db2->quoteName("tagmap.tag_id"))
->where($db2->quoteName('content.id') . ' = '. $item_tag->id);
$db2->setQuery($query2);
$items2 = $db2->loadObjectList();
$items3[$items2[0]->content_item_id]= $items2[0];
endforeach;
$tagOLD = '';
$arrray = [];
foreach($this->items as $articolo):
$arr_art[$items3[$articolo->id]->tag_id][] = $articolo;
endforeach;
?>
<div class="responsive-tabs responsive-tabs-aside r-tabs">
<div class="tabs-img">
<img class="img-fluid" src="<?= $baseImagePath ?>img-didattica.png" title="I cicli" alt="La didattica">
</div>
<div class="r-tabs-nav nav nav-tabs nav-tabs-vertical" id="nav-vertical-tab" role="tablist" aria-orientation="vertical">
<ul class="m-0 p-0">
<?php
$z1 = 0;
foreach($items3 as $tag):
if($tagOLD == $tag->tag_id){
$tagOLD = $tag->tag_id;
break;
}
?>
<li>
<a href="#nav-vertical-<?php echo $tag->tag_id; ?>" class="nav-link <?php if ($z1 == 0): ?>active<?php endif; ?>" id="nav-vertical-<?php echo $tag->tag_id; ?>-tab" data-bs-toggle="tab" role="tab" aria-controls="nav-vertical-<?php echo $tag->tag_id; ?>" aria-selected="false"><?php echo $tag->title; ?></a>
</li>
<?php
$tagOLD = $tag->tag_id;
$z1++;
endforeach;?>
</ul>
</div>
<div class="accordion-large accordion-wrapper responsive-tabs-wrapper">
<div class="pb-3 pb-lg-0">
<div class="tab-content" id="nav-vertical-tabContent">
<?php
$z2 = 0;
foreach($items3 as $tag):
/*if($tagOLD == $tag->tag_id){
continue;
} */
?>
<!--<h2><?php echo $tag->title; ?></h2>-->
<button class="btn bttabacc d-lg-none d-block" type="button" data-bs-toggle="collapse" data-bs-target="#nav-vertical-<?php echo $tag->tag_id; ?>" aria-expanded="false" aria-controls="nav-vertical-<?php echo $tag->tag_id; ?>">
<?php echo $tag->title; ?>
<svg class="icon icon-tab">
<use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use>
</svg>
</button>
<div class="collapse tab-pane <?php if ($z2 == 0): ?>active<?php endif; ?>" id="nav-vertical-<?php echo $tag->tag_id; ?>" role="tabpanel" aria-labelledby="nav-vertical-<?php echo $tag->tag_id; ?>-tab">
<div class="responsive-tabs-content accordion accordion-left-icon">
<?php foreach ($arr_art[$tag->tag_id] as $item) : ?>
<div class="accordion-large accordion-wrapper">
<div class="accordion-large-title accordion-header accordion-inactive">
<h3 class="mb-0">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapse<?php echo $item->id; ?>" aria-expanded="false" aria-controls="collapse1l">
<?php echo $this->escape($item->core_title); ?>
</button>
</h3>
</div>
<div id="collapse<?php echo $item->id; ?>" class="accordion-collapse collapse accordion-content" data-bs-parent="accordion<?php echo $tag->tag_id; ?>" role="region" aria-labelledby="heading1l">
<?php echo HTMLHelper::_('string.truncate', $item->core_body, $this->params->get('tag_list_item_maximum_characters')); ?>
<p>
<a href="<?php echo Route::_($item->link); ?>" class="btn">Per saperne di più</a>
</p>
</div>
</div>
<?php //$tagOLD = $tag->tag_id ?>
<?php endforeach; ?>
</div>
</div>
</div>
<?php
$z2++;
endforeach;
?>
</div>
</div>
</div>
<?php endif; ?>

View File

@ -0,0 +1,23 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 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\Users\Site\View\Login\HtmlView $this */
$cookieLogin = $this->user->get('cookieLogin');
if (!empty($cookieLogin) || $this->user->get('guest')) {
// The user is not logged in or needs to provide a password.
echo $this->loadTemplate('login');
} else {
// The user is already logged in.
echo $this->loadTemplate('logout');
}

View File

@ -0,0 +1,130 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 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\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
/** @var \Joomla\Component\Users\Site\View\Login\HtmlView $cookieLogin */
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
->useScript('form.validate');
$usersConfig = ComponentHelper::getParams('com_users');
?>
<div class="container">
<div class="com-users-login login mb-5">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
</div>
<?php endif; ?>
<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description', '')) != '') || $this->params->get('login_image') != '') : ?>
<div class="com-users-login__description login-description mb-3">
<?php endif; ?>
<?php if ($this->params->get('logindescription_show') == 1) : ?>
<?php echo $this->params->get('login_description'); ?>
<?php endif; ?>
<?php if ($this->params->get('login_image') != '') : ?>
<?php echo HTMLHelper::_('image', $this->params->get('login_image'), empty($this->params->get('login_image_alt')) && empty($this->params->get('login_image_alt_empty')) ? false : $this->params->get('login_image_alt'), ['class' => 'com-users-login__image login-image']); ?>
<?php endif; ?>
<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description', '')) != '') || $this->params->get('login_image') != '') : ?>
</div>
<?php endif; ?>
<form action="<?php echo Route::_('index.php?option=com_users&task=user.login'); ?>" method="post" class="com-users-login__form form-validate form-horizontal well" id="com-users-login__form">
<fieldset>
<?php echo $this->form->renderFieldset('credentials', ['class' => 'com-users-login__input']); ?>
<?php foreach ($this->extraButtons as $button) :
$dataAttributeKeys = array_filter(array_keys($button), function ($key) {
return substr($key, 0, 5) == 'data-';
});
?>
<div class="com-users-login__submit control-group">
<div class="controls">
<button type="button"
class="btn btn-secondary w-100 <?php echo $button['class'] ?? '' ?>"
<?php foreach ($dataAttributeKeys as $key) : ?>
<?php echo $key ?>="<?php echo $button[$key] ?>"
<?php endforeach; ?>
<?php if ($button['onclick']) : ?>
onclick="<?php echo $button['onclick'] ?>"
<?php endif; ?>
title="<?php echo Text::_($button['label']) ?>"
id="<?php echo $button['id'] ?>"
>
<?php if (!empty($button['icon'])) : ?>
<span class="<?php echo $button['icon'] ?>"></span>
<?php elseif (!empty($button['image'])) : ?>
<?php echo HTMLHelper::_('image', $button['image'], Text::_($button['tooltip'] ?? ''), [
'class' => 'icon',
], true) ?>
<?php elseif (!empty($button['svg'])) : ?>
<?php echo $button['svg']; ?>
<?php endif; ?>
<?php echo Text::_($button['label']) ?>
</button>
</div>
</div>
<?php endforeach; ?>
<div class="row">
<div class="col text-right mb-3 text-login-reset">
<a class="com-users-login__reset" href="<?php echo Route::_('index.php?option=com_users&view=reset'); ?>" title="Vai alla pagina del reset password">Password<?php //echo Text::_('COM_USERS_LOGIN_RESET'); ?></a> o <a class="com-users-login__remind" href="<?php echo Route::_('index.php?option=com_users&view=remind'); ?>" title="Vai alla pagina recupero nome utente">Utente<?php //echo Text::_('COM_USERS_LOGIN_REMIND'); ?></a> dimenticati?<?php if ($usersConfig->get('allowUserRegistration')) : ?> Oppure <a class="com-users-login__register" href="<?php echo Route::_('index.php?option=com_users&view=registration'); ?>" title="Vai alla pagina di registrazione">Registrati<?php //echo Text::_('COM_USERS_LOGIN_REGISTER'); ?></a>
<?php endif; ?>
</div>
</div>
<div class="row align-items-center mb-3">
<?php if (PluginHelper::isEnabled('system', 'remember')) : ?>
<div class="col-4">
<div class="com-users-login__remember">
<div class="form-check mt-0">
<input class="form-check-input" id="remember" type="checkbox" name="remember" value="yes">
<label class="form-check-label" for="remember">
<?php echo Text::_('COM_USERS_LOGIN_REMEMBER_ME'); ?>
</label>
</div>
</div>
</div>
<?php endif; ?>
<div class="col">
<div class="com-users-login__submit control-group">
<div class="controls">
<button type="submit" class="btn btn-secondary w-100">
<?php echo Text::_('JLOGIN'); ?>
</button>
</div>
</div>
</div>
</div>
<?php $return = $this->form->getValue('return', '', $this->params->get('login_redirect_url', $this->params->get('login_redirect_menuitem', ''))); ?>
<input type="hidden" name="return" value="<?php echo base64_encode($return); ?>">
<?php echo HTMLHelper::_('form.token'); ?>
</fieldset>
</form>
</div>
</div>

View File

@ -0,0 +1,60 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
/** @var \Joomla\Component\Users\Site\View\Login\HtmlView $this */
?>
<div class="com-users-logout logout">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
</div>
<?php endif; ?>
<?php if (($this->params->get('logoutdescription_show') == 1 && str_replace(' ', '', $this->params->get('logout_description', '')) != '') || $this->params->get('logout_image') != '') : ?>
<div class="com-users-logout__description logout-description">
<?php endif; ?>
<?php if ($this->params->get('logoutdescription_show') == 1) : ?>
<?php echo $this->params->get('logout_description'); ?>
<?php endif; ?>
<?php if ($this->params->get('logout_image') != '') : ?>
<?php echo HTMLHelper::_('image', $this->params->get('logout_image'), empty($this->params->get('logout_image_alt')) && empty($this->params->get('logout_image_alt_empty')) ? false : $this->params->get('logout_image_alt'), ['class' => 'com-users-logout__image thumbnail float-end logout-image']); ?>
<?php endif; ?>
<?php if (($this->params->get('logoutdescription_show') == 1 && str_replace(' ', '', $this->params->get('logout_description', '')) != '') || $this->params->get('logout_image') != '') : ?>
</div>
<?php endif; ?>
<form action="<?php echo Route::_('index.php?option=com_users&task=user.logout'); ?>" method="post" class="com-users-logout__form form-horizontal well">
<div class="com-users-logout__submit control-group">
<div class="controls">
<button type="submit" class="btn btn-primary">
<span class="icon-backward-2 icon-white" aria-hidden="true"></span>
<?php echo Text::_('JLOGOUT'); ?>
</button>
</div>
</div>
<?php if ($this->params->get('logout_redirect_url')) : ?>
<input type="hidden" name="return" value="<?php echo base64_encode($this->params->get('logout_redirect_url', $this->form->getValue('return', null, ''))); ?>">
<?php else : ?>
<input type="hidden" name="return" value="<?php echo base64_encode($this->params->get('logout_redirect_menuitem', $this->form->getValue('return', null, ''))); ?>">
<?php endif; ?>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>

View File

@ -0,0 +1,43 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 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\Text;
use Joomla\CMS\Router\Route;
?>
<div class="com-users-profile profile mb-5">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
</div>
<?php endif; ?>
<?php echo $this->loadTemplate('core'); ?>
<?php echo $this->loadTemplate('params'); ?>
<?php echo $this->loadTemplate('custom'); ?>
<?php if (Factory::getUser()->id == $this->data->id) : ?>
<div class="mb-5 d-block text-right">
<ul class="com-users-profile__edit btn-toolbar ps-0">
<li class="btn-group">
<a class="btn btn-secondary mb-5" href="<?php echo Route::_('index.php?option=com_users&task=profile.edit&user_id=' . (int) $this->data->id); ?>">
<span class="icon-user-edit" aria-hidden="true"></span> <?php echo Text::_('COM_USERS_EDIT_PROFILE'); ?>
</a>
</li>
</ul>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,53 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
?>
<fieldset id="users-profile-core" class="com-users-profile__core">
<legend>
<?php echo Text::_('COM_USERS_PROFILE_CORE_LEGEND'); ?>
</legend>
<dl class="dl-horizontal">
<dt>
<?php echo Text::_('COM_USERS_PROFILE_NAME_LABEL'); ?>
</dt>
<dd>
<?php echo $this->escape($this->data->name); ?>
</dd>
<dt>
<?php echo Text::_('COM_USERS_PROFILE_USERNAME_LABEL'); ?>
</dt>
<dd>
<?php echo $this->escape($this->data->username); ?>
</dd>
<dt>
<?php echo Text::_('COM_USERS_PROFILE_REGISTERED_DATE_LABEL'); ?>
</dt>
<dd>
<?php echo HTMLHelper::_('date', $this->data->registerDate, Text::_('DATE_FORMAT_LC1')); ?>
</dd>
<dt>
<?php echo Text::_('COM_USERS_PROFILE_LAST_VISITED_DATE_LABEL'); ?>
</dt>
<?php if ($this->data->lastvisitDate !== null) : ?>
<dd>
<?php echo HTMLHelper::_('date', $this->data->lastvisitDate, Text::_('DATE_FORMAT_LC1')); ?>
</dd>
<?php else : ?>
<dd>
<?php echo Text::_('COM_USERS_PROFILE_NEVER_VISITED'); ?>
</dd>
<?php endif; ?>
</dl>
</fieldset>

View File

@ -0,0 +1,75 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
$fieldsets = $this->form->getFieldsets();
if (isset($fieldsets['core'])) {
unset($fieldsets['core']);
}
if (isset($fieldsets['params'])) {
unset($fieldsets['params']);
}
$tmp = $this->data->jcfields ?? [];
$customFields = [];
foreach ($tmp as $customField) {
$customFields[$customField->name] = $customField;
}
unset($tmp);
?>
<?php foreach ($fieldsets as $group => $fieldset) : ?>
<?php $fields = $this->form->getFieldset($group); ?>
<?php if (count($fields)) : ?>
<fieldset id="users-profile-custom-<?php echo $group; ?>" class="com-users-profile__custom users-profile-custom-<?php echo $group; ?>">
<?php if (isset($fieldset->label) && ($legend = trim(Text::_($fieldset->label))) !== '') : ?>
<legend><?php echo $legend; ?></legend>
<?php endif; ?>
<?php if (isset($fieldset->description) && trim($fieldset->description)) : ?>
<p><?php echo $this->escape(Text::_($fieldset->description)); ?></p>
<?php endif; ?>
<dl class="dl-horizontal">
<?php foreach ($fields as $field) : ?>
<?php // Correct the field name so that subform custom fields show up. ?>
<?php if ($field->type === 'Subform' && $field->fieldname === 'row') : ?>
<?php preg_match("/jform\[com_fields]\[(.*)]/", $field->name, $matches); ?>
<?php $field->fieldname = $matches[1]; ?>
<?php endif; ?>
<?php if (!$field->hidden && $field->type !== 'Spacer') : ?>
<dt>
<?php echo $field->title; ?>
</dt>
<dd>
<?php if (array_key_exists($field->fieldname, $customFields)) : ?>
<?php echo strlen($customFields[$field->fieldname]->value) ? $customFields[$field->fieldname]->value : Text::_('COM_USERS_PROFILE_VALUE_NOT_FOUND'); ?>
<?php elseif (HTMLHelper::isRegistered('users.' . $field->id)) : ?>
<?php echo HTMLHelper::_('users.' . $field->id, $field->value); ?>
<?php elseif (HTMLHelper::isRegistered('users.' . $field->fieldname)) : ?>
<?php echo HTMLHelper::_('users.' . $field->fieldname, $field->value); ?>
<?php elseif (HTMLHelper::isRegistered('users.' . $field->type)) : ?>
<?php echo HTMLHelper::_('users.' . $field->type, $field->value); ?>
<?php else : ?>
<?php echo HTMLHelper::_('users.value', $field->value); ?>
<?php endif; ?>
</dd>
<?php endif; ?>
<?php endforeach; ?>
</dl>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>

View File

@ -0,0 +1,42 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2010 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
?>
<?php $fields = $this->form->getFieldset('params'); ?>
<?php if (count($fields)) : ?>
<fieldset id="users-profile-custom" class="com-users-profile__params">
<legend><?php echo Text::_('COM_USERS_SETTINGS_FIELDSET_LABEL'); ?></legend>
<dl class="dl-horizontal">
<?php foreach ($fields as $field) : ?>
<?php if (!$field->hidden) : ?>
<dt>
<?php echo $field->title; ?>
</dt>
<dd>
<?php if (HTMLHelper::isRegistered('users.' . $field->id)) : ?>
<?php echo HTMLHelper::_('users.' . $field->id, $field->value); ?>
<?php elseif (HTMLHelper::isRegistered('users.' . $field->fieldname)) : ?>
<?php echo HTMLHelper::_('users.' . $field->fieldname, $field->value); ?>
<?php elseif (HTMLHelper::isRegistered('users.' . $field->type)) : ?>
<?php echo HTMLHelper::_('users.' . $field->type, $field->value); ?>
<?php else : ?>
<?php echo HTMLHelper::_('users.value', $field->value); ?>
<?php endif; ?>
</dd>
<?php endif; ?>
<?php endforeach; ?>
</dl>
</fieldset>
<?php endif; ?>

View File

@ -0,0 +1,88 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
/** @var Joomla\Component\Users\Site\View\Profile\HtmlView $this */
HTMLHelper::_('bootstrap.tooltip', '.hasTooltip');
// Load user_profile plugin language
$lang = Factory::getLanguage();
$lang->load('plg_user_profile', JPATH_ADMINISTRATOR);
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
->useScript('form.validate');
?>
<div class="com-users-profile__edit profile-edit">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
</div>
<?php endif; ?>
<form id="member-profile" action="<?php echo Route::_('index.php?option=com_users'); ?>" method="post" class="com-users-profile__edit-form form-validate form-horizontal well" enctype="multipart/form-data">
<?php // Iterate through the form fieldsets and display each one. ?>
<?php foreach ($this->form->getFieldsets() as $group => $fieldset) : ?>
<?php $fields = $this->form->getFieldset($group); ?>
<?php if (count($fields)) : ?>
<fieldset>
<?php // If the fieldset has a label set, display it as the legend. ?>
<?php if (isset($fieldset->label)) : ?>
<legend>
<?php echo Text::_($fieldset->label); ?>
</legend>
<?php endif; ?>
<?php if (isset($fieldset->description) && trim($fieldset->description)) : ?>
<p>
<?php echo $this->escape(Text::_($fieldset->description)); ?>
</p>
<?php endif; ?>
<?php // Iterate through the fields in the set and display them. ?>
<?php foreach ($fields as $field) : ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($this->mfaConfigurationUI) : ?>
<fieldset class="com-users-profile__multifactor">
<legend><?php echo Text::_('COM_USERS_PROFILE_MULTIFACTOR_AUTH'); ?></legend>
<?php echo $this->mfaConfigurationUI ?>
</fieldset>
<?php endif; ?>
<div class="com-users-profile__edit-submit control-group">
<div class="controls">
<button type="submit" class="btn btn-primary validate" name="task" value="profile.save">
<span class="icon-check" aria-hidden="true"></span>
<?php echo Text::_('JSAVE'); ?>
</button>
<button type="submit" class="btn btn-danger" name="task" value="profile.cancel" formnovalidate>
<span class="icon-times" aria-hidden="true"></span>
<?php echo Text::_('JCANCEL'); ?>
</button>
<input type="hidden" name="option" value="com_users">
</div>
</div>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>

View File

@ -0,0 +1,20 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<div class="com-users-registration-complete registration-complete mb-5">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
</div>

View File

@ -0,0 +1,61 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
->useScript('form.validate');
?>
<div class="com-users-registration registration mb-5">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1><?php echo $this->escape($this->params->get('page_heading')); ?></h1>
</div>
<?php endif; ?>
<form id="member-registration" action="<?php echo Route::_('index.php?option=com_users&task=registration.register'); ?>" method="post" class="com-users-registration__form form-validate" enctype="multipart/form-data">
<?php // Iterate through the form fieldsets and display each one. ?>
<?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
<?php if ($fieldset->name === 'captcha' && $this->captchaEnabled) : ?>
<?php continue; ?>
<?php endif; ?>
<?php $fields = $this->form->getFieldset($fieldset->name); ?>
<?php if (count($fields)) : ?>
<fieldset>
<?php // If the fieldset has a label set, display it as the legend. ?>
<?php if (isset($fieldset->label)) : ?>
<legend class="text-login-reset"><?php echo Text::_($fieldset->label); ?></legend>
<?php endif; ?>
<?php echo $this->form->renderFieldset($fieldset->name); ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($this->captchaEnabled) : ?>
<?php echo $this->form->renderFieldset('captcha'); ?>
<?php endif; ?>
<div class="com-users-registration__submit control-group">
<div class="controls">
<button type="submit" class="com-users-registration__register btn btn-secondary validate w-100">
<?php echo Text::_('JREGISTER'); ?>
</button>
<input type="hidden" name="option" value="com_users">
<input type="hidden" name="task" value="registration.register">
</div>
</div>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>

Some files were not shown because too many files have changed in this diff Show More