mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-12-24 17:40:23 +00:00
Show tags in details view
This commit is contained in:
parent
72c7f9b072
commit
8dff15ff93
@ -12,6 +12,7 @@ namespace Joomla\Component\Weblinks\Site\Model;
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use Joomla\CMS\Language\Multilanguage;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\MVC\Model\ItemModel;
|
||||
@ -163,6 +164,13 @@ class WeblinkModel extends ItemModel
|
||||
$data->params = new Registry($data->params);
|
||||
$data->metadata = new Registry($data->metadata);
|
||||
|
||||
// Some contexts may not use tags data at all, so we allow callers to disable loading tag data
|
||||
if ($this->getState('load_tags', true))
|
||||
{
|
||||
$data->tags = new TagsHelper;
|
||||
$data->tags->getItemTags('com_weblinks.weblink', $data->id);
|
||||
}
|
||||
|
||||
// Compute access permissions.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
{
|
||||
@ -185,6 +193,7 @@ class WeblinkModel extends ItemModel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $this->_item[$pk];
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\String\PunycodeHelper;
|
||||
|
||||
$weblinkUrl = PunycodeHelper::urlToUTF8($this->item->url);
|
||||
|
Loading…
Reference in New Issue
Block a user