-
Notifications
You must be signed in to change notification settings - Fork 8
How It Works
The plugin runs synchronization on every access to the frontend page of your website. Elements are located in the corresponding directories of the plugin's working directory — web_assets
folder in the root directory of your website.
Pass the flush parameter at the end of the frontend url for MODX-Mirror to perform its magic. Example: http://your-website-url/?flush
If you put file with element's content not to the it's base folder (chunks
, templates
, plugins
and snippets
folders respectively) this directories tree will be converted to element's categories tree.
E.g. chunk that is located in the file chunks/Frontend/Navigation/MainMenuItem.html
will be displayed in manager panel as:
Note that MODx correctly works only with two levels of categories. That's why plugin will truncate longer caterory trees.
Special PHPDoc-like comments are supported for PHP files (snippets and plugins):
Dwell in detail on each of them:
-
@modxDescription
- specifies description of the element; -
@modxCategory
- identifies which category does element belong to. Categories should be divided with/
without leading slashes; -
@modxEvent
(may occur several times) - is applicable only for plugins and specifies one or more events that should be assigned to the plugin; -
@modxStaticFile
- identifies whether element static or not. Value of this comment should contain two parts, separated with@
— ID of the media source and the path of the external file.