dongteng0748 2014-03-01 11:54
浏览 79
已采纳

覆盖joomla类别列表视图

I'm trying to change category title in joomla category list (list of all articles in a certain category) but I simply can't find the right file to override.

Files are supposed to be in components\com_content\views\category\tmpl and there's default.php that renders wrapper with a class of .category-list and default_articles which is rendering table with list of article names in a selected category.

What I can't find is file which renders category title and description. Here's the content of default.php as it might be the key. I don't quite understand what files it's calling since I haven't been in joomla development for ages.

<div class="category-list<?php echo $this->pageclass_sfx;?>">

<?php
$this->subtemplatename = 'articles';
echo JLayoutHelper::render('joomla.content.category_default', $this);
?>

</div>

This would be simple schematic of final render:

<div class="category-list">
...
[part I can't find]
<h2>Category title</h2>
<div class="category-desc">...</div>
[/part I can't find]
default_articles.php >> renders table with all articles in category
...
</div>

I have managed to override all other views without any problems but this one is very elusive.

Thanks for any help!

  • 写回答

2条回答 默认 最新

  • douqian8238 2014-05-01 16:33
    关注

    The file is located here:

    /layouts/joomla/content/category_default.php
    

    To override it place a copy here:

    [YOUR_TEMPLATE]/html/layouts/joomla/content/
    

    You can read more about Joomla layouts here:
    Sharing layouts across views or extensions with JLayout

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 SQL Server下载
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥15 python爬取bilibili校园招聘网站
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件
  • ¥15 不同系统编译兼容问题
  • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?
  • ¥30 数字电源对DSP芯片的具体要求