-
☆ A M B ☆
- 1,231 Posts
Is it possible to have modx plugins working with other apps that are on the same server... I was wondering if you can create plugins in modx and have them run where ever you want within your web directory. The setup is as follows.
/modx-site
/other-app
Since modx is in the root and the main application, can you have plugins running over other apps or would it be required that the other-app be integrated in to modx first. I’m not sure how modx distinguishes between a modx page and a page from another app.
-
☆ A M B ☆
- 24,524 Posts
That depends on what you mean by "plugin". In MODx, a plugin is code that is inserted into the processing of core MODx functionality (logging in a user, parsing a document, etc).
If you include the MODx config file and the document.parser file, and instantiate a $modx (or whatever you want to call it) object, then you’ll have most of the functionality of MODx available to you, including the runSnippet function.
-
☆ A M B ☆
- 1,231 Posts
Thanks Susan, that made sense... I was wondering how I could have modx installed and a forum, create a plugin in modx, lets says a simple menu. The menu is created by the plugin and fires up on every modx page, rather than double coding and creating the same menu for the forum, allow the plugin to create the menu on the forum.
I just love how powerful the plugin feature is in modx and how easy it is to create pieces of code to be applied to pages. It would be really nice to be able to extend this abillity to other applications.
Have you managed to extend modx plugins or snippets to other applications with your method?
-
☆ A M B ☆
- 24,524 Posts
I think somebody has already linked their MODx menu to their forum; I don’t find a reference to it at the moment though.
-
☆ A M B ☆
- 1,231 Posts
I will try and search for it! Thanks.