Commit cc0d7a35 authored by nkoth's avatar nkoth

[ENH] Allow for single page wiki template to be used for search formatting

parent bd8bb0cb
......@@ -90,6 +90,11 @@ function wikiplugin_list($data, $params)
$plugin = new Search_Formatter_Plugin_SmartyTemplate($arguments['template']);
$plugin->setData($builder->getData($output->getBody()));
} elseif (isset($arguments['wiki'])) {
$wikitpl = "wiki:" . $arguments['wiki'];
$wikicontent = TikiLib::lib('smarty')->fetch($wikitpl);
$wikicontent = preg_replace("/\{\\$([^\}]+)\}/", "{display name=\\1}", $wikicontent);
$plugin = new Search_Formatter_Plugin_WikiTemplate($wikicontent);
} else {
$plugin = new Search_Formatter_Plugin_WikiTemplate($output->getBody());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment