diff --git a/components/com_content/src/View/Archive/HtmlView.php b/components/com_content/src/View/Archive/HtmlView.php index 2ba020c2b671c..8d7a4d4813642 100644 --- a/components/com_content/src/View/Archive/HtmlView.php +++ b/components/com_content/src/View/Archive/HtmlView.php @@ -132,6 +132,11 @@ public function display($tpl = null) PluginHelper::importPlugin('content'); + $this->event = new \stdClass(); + + $results = Factory::getApplication()->triggerEvent('onContentAfterItems', array('com_content.archive', &$this, &$this->params)); + $this->event->afterDisplayItems = trim(implode("\n", $results)); + foreach ($items as $item) { $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; diff --git a/components/com_content/src/View/Category/HtmlView.php b/components/com_content/src/View/Category/HtmlView.php index f591043108d5b..8acf15fdf0f79 100644 --- a/components/com_content/src/View/Category/HtmlView.php +++ b/components/com_content/src/View/Category/HtmlView.php @@ -179,6 +179,24 @@ public function display($tpl = null) } } + $this->category->text = $this->category->description; + $app->triggerEvent('onContentPrepare', array($this->category->extension . '.categories', &$this->category, &$this->params, 0)); + $this->category->description = $this->category->text; + + $this->category->event = new \stdClass(); + + $results = $app->triggerEvent('onContentAfterTitle', array($this->category->extension . '.categories', &$this->category, &$this->params, 0)); + $this->category->event->afterDisplayTitle = trim(implode("\n", $results)); + + $results = $app->triggerEvent('onContentBeforeDisplay', array($this->category->extension . '.categories', &$this->category, &$this->params, 0)); + $this->category->event->beforeDisplayContent = trim(implode("\n", $results)); + + $results = $app->triggerEvent('onContentAfterDisplay', array($this->category->extension . '.categories', &$this->category, &$this->params, 0)); + $this->category->event->afterDisplayContent = trim(implode("\n", $results)); + + $results = $app->triggerEvent('onContentAfterItems', array($this->category->extension . '.categories', &$this, &$this->params)); + $this->category->event->afterDisplayItems = trim(implode("\n", $results)); + parent::display($tpl); } diff --git a/components/com_content/src/View/Featured/HtmlView.php b/components/com_content/src/View/Featured/HtmlView.php index f99c629326c69..8deff8fde02e4 100644 --- a/components/com_content/src/View/Featured/HtmlView.php +++ b/components/com_content/src/View/Featured/HtmlView.php @@ -138,6 +138,11 @@ public function display($tpl = null) PluginHelper::importPlugin('content'); + $this->event = new \stdClass(); + + $results = Factory::getApplication()->triggerEvent('onContentAfterItems', array('com_content.featured', &$this, &$this->params)); + $this->event->afterDisplayItems = trim(implode("\n", $results)); + // Compute the article slugs and prepare introtext (runs content plugins). foreach ($items as &$item) { $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; diff --git a/components/com_content/tmpl/archive/default_items.php b/components/com_content/tmpl/archive/default_items.php index e080d636878a7..237896dfaa69a 100644 --- a/components/com_content/tmpl/archive/default_items.php +++ b/components/com_content/tmpl/archive/default_items.php @@ -229,6 +229,9 @@ + +event->afterDisplayItems; ?> +
+ + maxLevel != 0 && !empty($this->children[$this->category->id])) : ?>