在过去的几天里,我使用joomla建立了一个网站。 ATM我链接菜单,文章和模块。 在模板中,内容位置使用以下标记:
<jdoc:include type="component" />
这是应该呈现文章的地方。
当单击菜单项类型:单篇文章时,主站点上的组件区域中没有呈现内容。
在“组件”位置显示文章的唯一可能性是使用菜单类型:特色文章
如何在不使用精选文章的情况下获取在组件位置显示的内容?
有谁知道这个问题?
编辑:这是index.php的内容: 这是index.php的全部内容:
<!--<?php
defined("_JEXEC") or die("Restricted Access");
JHTML::_("behavior.framework", true);
$app = JFactory::getApplication();
$pathtotemplate = $this->baseurl."/templates/".$this->template;
?>-->
<!DOCTYPE html>
<html>
<head>
<jdoc:include type="head" />
<meta http-equiv='content-type' content='text/html; charset=UTF-8'>
<meta charset='utf-8'>
<link rel="icon" href="<?php echo $pathtotemplate ?>/favicon.ico" type="image/x-icon">
<!-- own Javascripts -->
<script type="text/javascript" src="<?php echo $pathtotemplate ?>/js/custom.js"></script>
<!-- Google Analytics -->
<script type="text/javascript" src="<?php echo $pathtotemplate ?>/js/google.js"></script>
<!-- system CSS Files -->
<link rel='stylesheet' href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel='stylesheet' href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<!-- own CSS Files -->
<link rel='stylesheet' href="<?php echo $pathtotemplate ?>/css/template.css" type="text/css" />
<!-- delete this file after developement -->
<link rel='stylesheet' type='text/css' href='css/template.css' />
</head>
<body>
<div id="site">
<header>
<div id='placeholder'> </div>
<div id='logo'>
<a href="<?php echo $this->baseurl ?>/" accesskey="h" tabindex="1">
<img src="<?php echo $pathtotemplate ?>/images/logo.png" width="178" height="260" name="Logo" alt="Logo von sattler energie consulting" />
</a>
</div>
<div id='headmenu'>
<div id='checken'>
<div class="headmenu">
<img src="<?php echo $pathtotemplate ?>/images/headmenu/rund/headmenu_rund_blank.png" />
<img src="<?php echo $pathtotemplate ?>/images/headmenu/rund/headmenu_rund_01.png" />
<div><jdoc:include type="modules" name="checken" /></div>
</div>
</div>
<div id='optimieren'>
<div class="headmenu">
<img src="<?php echo $pathtotemplate ?>/images/headmenu/rund/headmenu_rund_blank.png" />
<img src="<?php echo $pathtotemplate ?>/images/headmenu/rund/headmenu_rund_02.png" />
<div><jdoc:include type="modules" name="optimieren" /></div>
</div>
</div>
<div id='erhalten'>
<div class="headmenu">
<img src="<?php echo $pathtotemplate ?>/images/headmenu/rund/headmenu_rund_blank.png" />
<img src="<?php echo $pathtotemplate ?>/images/headmenu/rund/headmenu_rund_03.png" />
<div><jdoc:include type="modules" name="erhalten" /></div>
</div>
</div>
<div id='leben'>
<div class="headmenu">
<img src="<?php echo $pathtotemplate ?>/images/headmenu/rund/headmenu_rund_blank.png" />
<img src="<?php echo $pathtotemplate ?>/images/headmenu/rund/headmenu_rund_04.png" />
<div><jdoc:include type="modules" name="leben" /></div>
</div>
</div>
</div>
<div id='subhead' class="border-radius"><h1><jdoc:include type="modules" name="subhead" /></h1></div>
</header>
<div id='content'>
<div id='leftmenu'><jdoc:include type="modules" name="leftmenu" /></div>
<div id='main'>
<jdoc:include type="module" name="breadcrumbs" />
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
</div>
<footer>
<div id='inner_footer' class="border-radius"><jdoc:include type="modules" name="footer" /></div>
</footer>
</div>
</body>
</html>
答案 0 :(得分:0)
我刚刚尝试了您提供的模板代码,解决方案非常简单:
删除组件的名称。
自:
<jdoc:include type="component" name="component" />
更改为:
<jdoc:include type="component" />