From beac244a5d8cab3c1bc00e88738dbdbcd7dd592c Mon Sep 17 00:00:00 2001 From: kiendt Date: Fri, 10 Sep 2021 13:54:10 +0700 Subject: [PATCH] updated default columns con Joomla 4 --- .../html/com_content/featured/default.php | 3 +- .../com_content/featured/default_item.php | 35 +++++-------------- 2 files changed, 10 insertions(+), 28 deletions(-) diff --git a/source/plg_system_t3/base-bs3/html/com_content/featured/default.php b/source/plg_system_t3/base-bs3/html/com_content/featured/default.php index 8350b8f3c2..9e4489448c 100644 --- a/source/plg_system_t3/base-bs3/html/com_content/featured/default.php +++ b/source/plg_system_t3/base-bs3/html/com_content/featured/default.php @@ -24,7 +24,8 @@ abstract class ContentHelperRoute extends \Joomla\Component\content\Site\Helper\ if (version_compare(JVERSION, '4', 'lt')) { JHtml::_('behavior.caption'); } -$this->columns = !empty($this->columns) ? $this->columns : $this->params->get('num_columns'); +$this->columns = !empty($this->columns) ? $this->columns : $this->params->get('num_columns',1); +if(!$this->columns) $this->columns = 1; // If the page class is defined, add to class as suffix. // It will be a separate class if the user starts it with a space diff --git a/source/plg_system_t3/base-bs3/html/com_content/featured/default_item.php b/source/plg_system_t3/base-bs3/html/com_content/featured/default_item.php index 8a8dc5cc10..242a7388e9 100755 --- a/source/plg_system_t3/base-bs3/html/com_content/featured/default_item.php +++ b/source/plg_system_t3/base-bs3/html/com_content/featured/default_item.php @@ -78,38 +78,19 @@ item->tags->itemTags); ?> - get('show_readmore') && $this->item->readmore) : + get('show_readmore')) : if ($params->get('access-view')) : - $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); + $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); else : $menu = JFactory::getApplication()->getMenu(); $active = $menu->getActive(); $itemId = $active->id; - $link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId); - $returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); - $link = new JURI($link1); - $link->setVar('return', base64_encode($returnURL)); - endif; - ?> -
- -
+ $link = new JUri(JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); + $link->setVar('return', base64_encode(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); + endif; ?> + + $this->item, 'params' => $params, 'link' => $link)); ?> +