【问题标题】:<jdoc:include type ="component" /> doesn't work<jdoc:include type ="component" /> 不起作用
【发布时间】:2019-11-04 12:35:35
【问题描述】:

我采用了一个空模板,并在 index.php 中输入了显示文章的代码 .. 在视频教程中,所有内容都正确显示,但我没有显示任何内容

如果我将默认模板设置为默认,一切正常。我已将所有内容链接在一起(文章与类别,类别与菜单)并激活但没有显示。当我编写普通 html 代码时,所有内容都会显示给我。

...
<body class="<?php echo (($menu->getActive() == $menu->getDefault()) ? ('front') : ('site')).' '.$active->alias.' '.$pageclass; ?>">


  <h1>Hello</h1>
 <hr />
    <jdoc:include type ="component" />
 <hr />

我错了吗?因为在教程中它使用相同的代码

【问题讨论】:

  • 请将您的 Joomla 问题发布到 Joomla Stack Exchange。

标签: joomla content-management-system


【解决方案1】:
<jdoc:include type ="component" />

删除 type 和 = 之间的空格,如下所示:

<jdoc:include type="component" />

就像在 HTML 中一样,属性和它的值之间永远不能有空格。

【讨论】:

  • 如果这是正确答案,那么将问题作为离题错字结束会更合适。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-08-15
  • 1970-01-01
  • 2022-08-16
  • 2017-07-02
  • 1970-01-01
相关资源
最近更新 更多