Joomla类别页面显示模块的条件
我希望仅当视图中存在特定类别时,页面上才会显示指向我网站上特定文章的链接。
例如:我有一个名为 FBrand 的类别。当有人在类别页面上(查看该类别的类别博客)时,我不希望页面上的自定义 HTML 模块中的文章“List of FBrand Shops”以广告的形式出现。
我不知道的是如何通过名称或别名检查类别的条件,例如在wordpress中: if( is_category( 'FBrand' ) ):
这因为生产环境中的category id可能会不同。
I want a link to a specific article on my site to appear on the page only if a specific category is in the view.
For eg: I have a category called FBrand. When someone is on the category page (viewing the category blog of that category), I wan't the article "List of FBrand Shops" on the page in a Custom HTML module in the form of an advertisement.
What I don't know is how to check the condition of the category by the name or slug, like in wordpress: if( is_category( 'FBrand' ) ):
This is because the id of the category could be different in the production environment.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这个优秀的扩展:
http://extensions.joomla .org/extensions/access-a-security/modules-management/3391
Metamod 允许您显示基于各种变量的模块,其中应包括类别 slug。查看 http://www.metamodpro.com/jomgenius/parameters 了解所有选项。
Take a look at this excellent extension:
http://extensions.joomla.org/extensions/access-a-security/modules-management/3391
Metamod allows you to display modules based on all kinds of variables which should include the category slug. Check out http://www.metamodpro.com/jomgenius/parameters for all the options.