du7535 2014-04-09 17:04
浏览 766
已采纳

组件中模板视图的“default_”部分是什么意思?

I have noticed that a name of a template in joomla's component view begins with "default_" part. What the reason for it, how it can be changed?

  • 写回答

1条回答 默认 最新

  • du131642 2014-04-09 22:46
    关注

    you can simply create different template overrides as you like. F.ex. in com_content article view, make a copy of default.php and call it simple.php. You can display the new article template by calling index.php?option=com_content&view=article&tmpl=simple&id=an-id.

    The _ - notation is to be able to divide the template into logical parts. F.ex. for the category blog-layout you have blog.php as the entry-point. The blog-layout is looping throug the content items in the category, and calling blog_item.php for each article item. So code relating directly to each article is handled here. If you override files in the template, you can choose to only override one of the files( like blog_item.php ), and let the other file get handled by by the component as usual.

    regards Jonas

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题