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 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀