Joomla 3隐藏某些页面上的位置

时间:2015-09-22 17:37:20

标签: css joomla joomla3.0 joomla-extensions

我有一个我在网站上使用的自定义模板。在我的页面右侧,我有一个背景颜色的位置,我不想在我的使用条款页面上显示。该位置包含一个twitter模块,我可以从页面中删除,但我仍然留下一个包含css背景颜色的小盒子。我可以完全从使用条款页面中删除此位置。

2 个答案:

答案 0 :(得分:1)

在您的使用条款页面中,添加一个自定义类terms-of-use,然后使用background: transparent覆盖它

可以通过Adding custom class on Joomla pages

生成动态自定义类

<强> CSS

body.terms-of-use .social {
  background: transparent;
}

<强>输出:

enter image description here

答案 1 :(得分:0)

您可以编辑html模板,查找index.php中显示模块的位置将是这样的......

<jdoc:include type="modules" name="social" style="none" />

并在PHP中添加一些代码,以便在发布模块时仅显示模块。这样,如果没有要显示的内容,joomla将不会写任何内容,除了改善页面的加载外,不需要在CSS中做任何事情。

<?php if($this->countModules('social')) : ?>
     <jdoc:include type="modules" name="social" style="none" />
<?php endif; ?>
相关问题