简体   繁体   English

如何仅在文章页面中添加某些模块(Joomla 1.5)

[英]How to add just certain modules in article page(Joomla 1.5)

I am new to Joomla and doing theme customization on localhost.Now every thing is working fine .But i don't Know that if there is menu link which associated with a article.When i click on that i want that leftpanel of my index.php page and some other modules do not display at the time of that aricle is displaying on the screen.How to do that to remove certain modules at the time of pariculer aricle is displaying on the page.Please give me a step by step decsription for this problem as i am new to joomla. 我是Joomla的新手,并且在localhost上进行主题自定义。现在一切正常。但是我不知道是否有与文章相关的菜单链接。当我单击该链接时,我想要索引的左面板。 php页面和一些其他模块在该Aricle显示在屏幕上时不显示。如何在pariculer aricle时该页面上显示某些模块的移除方法。请给我逐步说明这个问题,因为我是joomla的新手。

Thanks in advance!!!!! 提前致谢!!!!!

Take a look at this: 看看这个:

http://docs.joomla.org/How_do_you_assign_a_module_to_specific_pages%3F http://docs.joomla.org/How_do_you_assign_a_module_to_specific_pages%3F

If you need to assign modules to more complex situations, use: 如果需要将模块分配给更复杂的情况,请使用:

http://www.nonumber.nl/extensions/advancedmodulemanager http://www.nonumber.nl/extensions/advancedmodulemanager

Go to that particular module from "module manager" from joomla admin manager. 从joomla管理员管理器的“模块管理器”转到该特定模块。 Then uncheck it's visibility from particular menu which u had created. 然后从您创建的特定菜单中取消选中它的可见性。 If u keep it display on all page it show that module on all menu items which u had create. 如果您将其保留在所有页面上显示,则会在您创建的所有菜单项上显示该模块。 Check only that menu on which you want to display that module. 仅检查要在其上显示该模块的菜单。

If you are talking about only displaying a module on certain articles that do not have a menu item to control the display with, one solution would be to add in an assertion to your template in a new module position, something like: 如果您只想在某些没有菜单项来控制显示的文章上显示模块,则一种解决方案是在模板的新模块位置添加一个断言,例如:

<?php
$articleId = Number of article from a query or set as static value....
if(JRequest::getVar('option') == 'com_content' && JRequest::getVar('id') == $articleId)
{
?>
    <jdoc:include type="modules" name="slideshow" style="xhtml"/>
<?php
}
?>

That is how you would do it if the module position is outside of the content area, alternatively if you want to display a module inside an article you could use {loadposition myModulePosition}, just make sure the module is set to display on all pages (dont worry it wont due to the conditional). 如果模块位置在内容区域之外,则可以这样做,或者,如果要在文章中显示模块,可以使用{loadposition myModulePosition},只需确保将模块设置为在所有页面上显示(不必担心由于条件而不会)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM