在JDocument type RAW上运行内容插件(即temp。用其他类型替换JDocument)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在JDocument type RAW上运行内容插件(即temp。用其他类型替换JDocument)相关的知识,希望对你有一定的参考价值。
Say you want to run content plugins on JDocumentRAW content (like in a component that returns JSON data). Some methods in JDocumenthtml like "addCustomTag" will cause the app to fail on JDocumentRAW doc types which don't have this method. Thus you need to temporarily replace it to trick the content plugins...
$document =& JFactory::getDocument(); $oldDoc = clone( $document ); $document = JDocument::getInstance('html'); JPluginHelper::importPlugin('content'); $article = new JObject(); $article->text = $lesson->rendered; $lesson->rendered = $article->text; $document = $oldDoc;
以上是关于在JDocument type RAW上运行内容插件(即temp。用其他类型替换JDocument)的主要内容,如果未能解决你的问题,请参考以下文章
3K/4K 双USB Type-C接口盲插便携显示器解决方案
1080P/2K 双USB Type-C接口盲插便携显示器解决方案