User Tools

Site Tools


plugins

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugins [2021/10/01 11:24] witsecplugins [2024/09/01 14:30] (current) – external edit 127.0.0.1
Line 43: Line 43:
 === files === === files ===
 This is a list of one or more files you want to load or publish. Mobirise is smart enough to automatically place JavaScript files in the HTML. If you want to load images or other file types, Mobirise will simply publish them, without putting them in any HTML. This is a list of one or more files you want to load or publish. Mobirise is smart enough to automatically place JavaScript files in the HTML. If you want to load images or other file types, Mobirise will simply publish them, without putting them in any HTML.
 +
 +Files don't **have** to be in their own folder, but especially if you have multiple files for a plugin, it's easier to manage them by placing them in their own folder.
  
  
Line 76: Line 78:
  
 If the condition is met, the plugin will be loaded. In this case you've set it to ''true'', so the plugin will always be loaded and you'll always find the ''myscript.js'' file referenced inside the HTML. If the condition is met, the plugin will be loaded. In this case you've set it to ''true'', so the plugin will always be loaded and you'll always find the ''myscript.js'' file referenced inside the HTML.
 +
 +It's also possible to have the plugin rely on a theme or parameter setting. For example, if your plugin should only be loaded if the "Animate on Scroll" is enabled, you could do something like this:
 +
 +<code javascript>
 +[
 +  {
 +    "name": "plugin-name",
 +    "condition": ["_theme.isAnimatedOnScroll"],
 +    "priority": 3000,
 +    "files": [
 +      "plugin-name-or-directory/myscript.js"
 +    ]
 +  }
 +]
 +</code>
plugins.1633080268.txt.gz · Last modified: 2024/09/01 14:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki