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; ?> +
params->def('show_pagination_results', 1)) : ?>

diff --git a/components/com_content/tmpl/category/blog.php b/components/com_content/tmpl/category/blog.php index 3dcc50da8e7ec..4cf579a1dab03 100644 --- a/components/com_content/tmpl/category/blog.php +++ b/components/com_content/tmpl/category/blog.php @@ -18,18 +18,10 @@ $app = Factory::getApplication(); -$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; - -$results = $app->triggerEvent('onContentAfterTitle', array($this->category->extension . '.categories', &$this->category, &$this->params, 0)); -$afterDisplayTitle = trim(implode("\n", $results)); - -$results = $app->triggerEvent('onContentBeforeDisplay', array($this->category->extension . '.categories', &$this->category, &$this->params, 0)); -$beforeDisplayContent = trim(implode("\n", $results)); - -$results = $app->triggerEvent('onContentAfterDisplay', array($this->category->extension . '.categories', &$this->category, &$this->params, 0)); -$afterDisplayContent = trim(implode("\n", $results)); +$afterDisplayTitle = $this->category->event->afterDisplayTitle; +$beforeDisplayContent = $this->category->event->beforeDisplayContent; +$afterDisplayContent = $this->category->event->afterDisplayContent; +$afterDisplayItems = $this->category->event->afterDisplayItems; $htag = $this->params->get('show_page_heading') ? 'h2' : 'h1'; @@ -119,6 +111,8 @@

+ + maxLevel != 0 && !empty($this->children[$this->category->id])) : ?>
params->get('show_category_heading_title_text', 1) == 1) : ?> diff --git a/components/com_content/tmpl/category/default_articles.php b/components/com_content/tmpl/category/default_articles.php index d6c8d5b760579..ce54c32e71f28 100644 --- a/components/com_content/tmpl/category/default_articles.php +++ b/components/com_content/tmpl/category/default_articles.php @@ -325,6 +325,8 @@ category, $this->category->params); ?> + category->event->afterDisplayItems; ?> + items)) : ?> params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?> diff --git a/components/com_content/tmpl/featured/default.php b/components/com_content/tmpl/featured/default.php index fd98ab1f5284d..15a2ef33ffa46 100644 --- a/components/com_content/tmpl/featured/default.php +++ b/components/com_content/tmpl/featured/default.php @@ -59,6 +59,8 @@
+ event->afterDisplayItems; ?> + params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->pagesTotal > 1)) : ?>
params->def('show_pagination_results', 1)) : ?>