* @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
/** @var \Joomla\Component\Content\Site\View\Featured\HtmlView $this */
// Create a shortcut for params.
$params  = &$this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info    = $this->item->params->get('info_block_position', 0);
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate       = Factory::getDate()->format('Y-m-d H:i:s');
$isExpired         = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isUnpublished     = $this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $isNotPublishedYet || $isExpired;
?>
item); ?>
    
        
    
    item->state == ContentComponent::CONDITION_UNPUBLISHED) : ?>
        
    
    
        
    
    
        
    
    
         $params, 'item' => $this->item]); ?>
    
    
    item->event->afterDisplayTitle; ?>
    
    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); ?>
    
         $this->item, 'params' => $params, 'position' => 'above']); ?>
    
    get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
        item->tags->itemTags); ?>
    
    
    item->event->beforeDisplayContent; ?>
    
        
             $this->item, 'params' => $params, 'position' => 'below']); ?>
        
        get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
            item->tags->itemTags); ?>
        
    
    get('show_title')) : ?>
        
        get('link_titles') && $params->get('access-view')) : ?>
            
                escape($this->item->title); ?>
            
        
            escape($this->item->title); ?>
        
        
    
    item->introtext; ?>
    
    item->introtext;
        // Rimuovi i tag HTML
        $clean_introtext = strip_tags($introtext);
        // Limita a 100 caratteri
        $limited_introtext = mb_substr($clean_introtext, 0, 100); 
        // Aggiungi "..." se il testo originale era più lungo
        if (mb_strlen($clean_introtext) > 130) {
            $limited_introtext .= '...';
        }*/
    ?>
    
    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; ?>
         $this->item, 'params' => $params, 'link' => $link]); ?>
    
    
        
 
item->event->afterDisplayContent; ?>