doukucai0099 2015-02-23 12:41
浏览 29

如何将菜单模板包含到所有视图中

I'm currently writing an extension for my site in which I use Joomla! I'm now stuck on my info pages in which different kind of information about a movie is separated into different views/menus. I thought about putting the templates all in the same folder and only using one view.html.php to have the minimum of duplicate code. My structure looks like this:

enter image description here

I want the default_menu.php to be included in alle templates, that's why I thought that this would be the best practise.

But Joomla searches the folder with the name of the view that is called in the fronted. e.g. www.site.net/com_component&view=car would look for the folder /views/car/ And that's the point where I'm stuck. How can I tell Joomla to look at one folder for different view names? And is this the best practice or Should I still separate the templates in different folders even though I would have a few view.html.php containing pretty much the same code? And of course I still have to include the menu in every template.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 关于大棚监测的pcb板设计
    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器
    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
    • ¥15 Vue3地图和异步函数使用