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 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?