Joomla类别页面显示模块的条件

发布于 2024-12-10 20:33:02 字数 268 浏览 1 评论 0原文

我希望仅当视图中存在特定类别时,页面上才会显示指向我网站上特定文章的链接。

例如:我有一个名为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

予囚 2024-12-17 20:33:02

看看这个优秀的扩展:

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文