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 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
  • ¥50 mac mini外接显示器 画质字体模糊
  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写
  • ¥20 Qcustomplot缩小曲线形状问题
  • ¥15 企业资源规划ERP沙盘模拟