Hello.
I'm trying to understand how to optimize processor usage by not duplicating processors used in the manager for the frontend.
Also the new OO processors make it a little harder to understand how to reuse them for the frontend (called from snippet)
Tried $modx->runProcessor but it seams to search only on local modx processors folder and I'm following the doodles tutorial and my extra is external to modx root.
Can someone give my some tips how to use processors for both back and front end.
Thanks
-
☆ A M B ☆
- 24,524 Posts
According to this, you can specify the path to the processor
http://rtfm.modx.com/display/revolution20/modX.runProcessor
According to the API:
$action - string -The processor to run, eg: context/update
$scriptProperties - array - Optional. An array of parameters to pass to the processor.
$options - array - Optional. An array of options for running the processor, such as:
- processors_path - If specified, will override the default MODX processors path.
- location - A prefix to load processor files from, will prepend to the action parameter (Note: location will be deprecated in future Revolution versions.)