no load default.php override default article template
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
// Create shortcuts to some parameters.
$params = $this->item->params;
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$canEdit = $params->get('access-edit');
$user = JFactory::getUser();
$info = $params->get('info_block_position', 0);
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (JLanguageAssociations::isEnabled() && $params->get('show_associations'));
JHtml::_('behavior.caption');
$app = JFactory::getApplication();
?>
<?php echo JLayoutHelper::render('joomla.content.info_block.block', array('item' => $this->item, 'params' => $params, 'position' => 'below')); ?>
<?php
$cat_accounting_news = 39;
$cat_legal_news = 38;
$cat_services_id = 18;
$reviews_category_id = 46;
if($this->item->catid == $cat_accounting_news || $this->item->catid == $cat_legal_news){
include JPATH_SITE.DS.'templates'.DS.$app->getTemplate().DS.'html/com_content/article/news.php';
}elseif($this->item->parent_id == $cat_services_id) {
include JPATH_SITE.DS.'templates'.DS.$app->getTemplate().DS.'html/com_content/article/service.php';
}
elseif ($this->item->catid == $reviews_category_id) {
include JPATH_SITE.DS.'templates'.DS.$app->getTemplate().DS.'html/com_content/article/review.php';
}
else {
include JPATH_SITE.DS.'templates'.DS.$app->getTemplate().DS.'html/com_content/article/element.php';
}
?>
empty page
no load element.php review.php service.php news.php
Joomla 3.8.11 normal work
Labels |
Added:
?
|
Activate error_reporting in Joomla configuration!
I think you will get a message like 'DS' is not defined
.
You should ask in a forum for help because that's not a Joomla core issue
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-12-19 01:06:22 |
Closed_By | ⇒ | joomla-cms-bot |
Closed_Date | 2018-12-19 01:06:22 | ⇒ | 2018-12-19 01:06:23 |
Closed_By | joomla-cms-bot | ⇒ | Quy |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23159
work else static address