From 70bb5399310cbe0e1bd154ce431904953da8f68b Mon Sep 17 00:00:00 2001 From: Tuan Pham Ngoc Date: Sat, 10 Jul 2021 17:28:40 +0700 Subject: [PATCH] Basic category layout (base on layout from com_contact) --- .../com_weblinks/tmpl/category/default.php | 11 ++- .../tmpl/category/default_children.php | 77 ++++++++----------- 2 files changed, 43 insertions(+), 45 deletions(-) diff --git a/src/components/com_weblinks/tmpl/category/default.php b/src/components/com_weblinks/tmpl/category/default.php index 0c6a3dd..a5990da 100644 --- a/src/components/com_weblinks/tmpl/category/default.php +++ b/src/components/com_weblinks/tmpl/category/default.php @@ -9,5 +9,12 @@ defined('_JEXEC') or die; -$this->subtemplatename = 'items'; -echo JLayoutHelper::render('joomla.content.category_default', $this); +use Joomla\CMS\Layout\LayoutHelper; + +?> + \ No newline at end of file diff --git a/src/components/com_weblinks/tmpl/category/default_children.php b/src/components/com_weblinks/tmpl/category/default_children.php index 24e94ce..6cb5b97 100644 --- a/src/components/com_weblinks/tmpl/category/default_children.php +++ b/src/components/com_weblinks/tmpl/category/default_children.php @@ -14,49 +14,40 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\Component\Weblinks\Site\Helper\RouteHelper; -$class = ' class="first"'; -if (count($this->children[$this->category->id]) > 0 && $this->maxLevel != 0) : +if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : ?> - +