Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在内容插件中获取当前页面<jdoc:include type="component" />区域的内容,并将其写入 html 文件fwrite($ourFileHandle, $component);
<jdoc:include type="component" />
fwrite($ourFileHandle, $component);
&tmpl=component您可以通过附加到资源 URL来提取组件内容 。
&tmpl=component
例子:
http://example.com/index.php?option=com_yourcomponent&view=viewname&tmpl=component
是的,您有两个事件 onBeforeContentPrepare() 和 onAfterContentPrepare() 都保存组件的内容,您可以从那里登录到磁盘甚至更改内容。