Hi all,
i'm still using 0.10 version of cmsms. what i'm trying to do is make one plug-in execute another plug-in. i.e. i have some record in database, i get it with sql query. Let's say the field type is text, and there is some content in it. And among this content there is some tag like {breadcrums} or whatever. If I simply print all the content to the screen I get just the name {breadcrumbs}, but what I need is that I would get the result of the breadcrumbs plug-in.
I hope I wrote it all clear.
Thanx in advance!
plugin in plugin
Re: plugin in plugin
Call the actual function that is inside your plugin. From plugin #1:
However, keep in mind that this will not work when you upgrade. In 0.10, all plugins are loaded by default. In 0.12 (and maybe 0.11.x... I forget), plugins are loaded as needed by smarty. To be honest, i'm not sure of how to do this in the later releases without getting to into the internals of Smarty.
Code: Select all
$output = smarty_cms_function_breadcrumbs($smarty, $params);
-
pishkus
Re: plugin in plugin
Hi,
hmm, maybe I described the problem not clear enough, or I don't know how to use wishy's hint
)
Let's say i have content like this
I get this information from database in my own writen plugin. And when i print the text to the screen it stays as it is written. But i need it replaced to.
Well it's not a problem to replace the tag with some standart php function, but things become difficult when there is some extra params like {menu start_id='13'}.
hmm, maybe I described the problem not clear enough, or I don't know how to use wishy's hint
Let's say i have content like this
Code: Select all
Cmsms is nice. Breadcrumbs work like this:
{breadcrumbs}
(above you see plugin working)
Code: Select all
Cmsms is nice. Breadcrumbs work like this:
Start/News... (etc)
(above you see plugin working)

