我正面临着对一个大型Joomla站点进行逆向工程的任务--进行更改和添加。
我可以很容易地找到页面后面的模板。但是,很难找到哪个视图文件正在向该模板提供变量值。
任何提示或建议都将不胜感激。
感谢您的阅读。
发布于 2013-04-12 08:43:18
我想你对Joomla有一些误解!模板在1.5中有效。
模板不是通过它们所显示的视图传递的值。
模板就是这样,一个由Joomla处理的模板,它寻找<jdoc>标签,并有效地用component和页面上显示的任何modules生成的输出替换它们。(插件也可以处理页面内容,但级别较低)。
例如,您可以在Joomla!1.5.x附带的rhuk_milkyway模板中找到这些jdoc语句
<jdoc:include type="modules" name="top" />
<jdoc:include type="modules" name="user3" />
<jdoc:include type="modules" name="user4" />
<jdoc:include type="modules" name="breadcrumb" />
<jdoc:include type="message" />
<jdoc:include type="modules" name="left" style="rounded" />
<jdoc:include type="modules" name="user1" style="xhtml" />
<jdoc:include type="modules" name="user2" style="xhtml" />
<jdoc:include type="component" />
<jdoc:include type="modules" name="footer" style="xhtml"/>
<jdoc:include type="modules" name="right" style="xhtml"/>
<jdoc:include type="modules" name="syndicate" />
<jdoc:include type="modules" name="debug" />要找出是什么在页面上的特定位置生成内容,您需要确定它是模块还是主组件。如果它是一个生成内容的组件(这通常是生成Joomla主体的组件!页),则可以在组件的菜单项中找到该组件的设置。
如果它是一个模块,生成你感兴趣的页面部分,你需要打开Menu Manager,然后找到相关的模块并打开它来获取它的设置。
https://stackoverflow.com/questions/15957527
复制相似问题