donglusou3335 2017-05-02 14:21
浏览 42

如何在主页和类别菜单中隐藏Joomla自定义字段?

If I create custom field in Joomla, it's will show in homepage (featured article) and blog category menu.

I want custom fields to only show in a single article. It should be hidden in the homepage (featured articles) and blog category menu.

Where can I setting it or modify in PHP code?

  • 写回答

2条回答 默认 最新

  • dsdt66064367 2017-05-03 17:57
    关注

    The files you need to override are at \components\com_content\views\featured\tmpl\default_item.php and \components\com_content\views\category\tmpl\blog_item.php

    Important : core files should be overridden in your template, and the core code left unchanged.

    The fields themselves are generated by the lines

    <?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
    <?php echo $this->item->event->beforeDisplayContent; ?>
    

    Note that removing these lines will also stop any other plugin which uses this area from working. As far as I can tell, the only other thing to use it is the voting system. If you need that, then you may need to write a bespoke plugin or just hide the area with CSS.

    评论

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测