diff --git a/components/com_content/views/article/tmpl/default.php b/components/com_content/views/article/tmpl/default.php index ea83bcf7bbe4c..7883626280d74 100644 --- a/components/com_content/views/article/tmpl/default.php +++ b/components/com_content/views/article/tmpl/default.php @@ -134,7 +134,7 @@ get('show_noauth') == true && $user->get('guest')) : ?> item); ?> - item->introtext); ?> + item->text; ?> get('show_readmore') && $this->item->fulltext != null) : ?> getMenu(); ?> diff --git a/components/com_content/views/article/view.html.php b/components/com_content/views/article/view.html.php index 6b09a9330e69b..f716accb49111 100644 --- a/components/com_content/views/article/view.html.php +++ b/components/com_content/views/article/view.html.php @@ -130,6 +130,8 @@ public function display($tpl = null) $offset = $this->state->get('list.offset'); + $full_fix = true; + // Check the view access to the article (the model has already computed the values). if ($item->params->get('access-view') == false && ($item->params->get('show_noauth', '0') == '0')) { @@ -139,13 +141,19 @@ public function display($tpl = null) return; } - if ($item->params->get('show_intro', '1') == '1') + if (!$item->params->get('access-view') && $item->params->get('show_noauth', '0')) + { + $item->text = $item->introtext; + } + elseif ($item->fulltext && $item->params->get('show_intro', '1')) { $item->text = $item->introtext . ' ' . $item->fulltext; + $full_fix = false; } elseif ($item->fulltext) { $item->text = $item->fulltext; + $full_fix = false; } else { @@ -160,6 +168,13 @@ public function display($tpl = null) JPluginHelper::importPlugin('content'); $dispatcher->trigger('onContentPrepare', array ('com_content.article', &$item, &$item->params, $offset)); + // Copy "text" to "introtext" for B/C (some templates might still use introtext...) + // Don't do that when introtex != text, for full B/C with (non core) templates using introtext when that's not supposed to happen + if ($full_fix) + { + $item->introtext = $item->text; + } + $item->event = new stdClass; $results = $dispatcher->trigger('onContentAfterTitle', array('com_content.article', &$item, &$item->params, $offset)); $item->event->afterDisplayTitle = trim(implode("\n", $results));