Override Joomla Component Template

时间秒杀一切 提交于 2019-12-06 15:20:14

问题


I am using this URL to access the raw HTML of a component:

/index.php?option=com_downloadform&tmpl=component

However it also returns the document type, title tags, head tags etc.

Is there a way to return only the content between <body> and </body>?

Thanks,

Ian


回答1:


Inside your template folder, create a file (e.g. raw.php) and inside that file place only:

<jdoc:include type="component" />

Then, you can use /index.php?option=com_downloadform&tmpl=raw to access the raw output of the component. The tmpl parameter in your link must be the name of the file without the extension.



来源:https://stackoverflow.com/questions/10978067/override-joomla-component-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!