Date post: | 20-May-2015 |
Category: |
Technology |
Upload: | andrew-myers |
View: | 1,929 times |
Download: | 0 times |
Extending Mura CMS with Custom Plugins
cf.Objective(ANZ) 2011
About the presenter
Java developer for early part of career Joined RISE in 2005 Developing in ColdFusion since… …and loving it!
Twitter: @am2605 Email: [email protected]
About the audience?
Who is using a CMS? Who is using Mura?
Who is using Mura plugins?
About the presentation
Overview of Mura (brief)
Mura Plugins when & why? how?
walk through some simple plugin code
About the presentation (cont.)
What you will take away: Understanding of plugins & what they are Starting point for building your own plugins
(published on github) Development tips, techniques and pitfalls
to avoid
Mura
Open Source Content Management System (CMS)
GPL, with exceptions for plugins, themes and bundles*
* See https://github.com/blueriver/MuraCMS/blob/develop/index.cfm
Mura
Commercial licensing and support available, should you prefer
Mura (cont…)
Features Easy for front end users
to learn and use Novice users / no
knowledge of HTML
Templates and content styling
Mura (cont…)
Features Easily extensible
Mura MarketplacePlugins Templates
Create you own!Plugins Templates
What are Mura Plugins?
Extend Mura with new functionality
Examples from the Mura Marketplace include: eCommerce, Google
Maps integration, Survey module
What are Mura Plugins?
Extend Mura with new functionality Installable, distributable package Contains all the necessary elements
to build powerful custom applications within Mura CMS
How Mura Plugins work
Provide Display Objects
These are in turn embedded in Mura pages
Can be used across multiple sites
When use Mura Plugins?
Plugins are only one of numerous ways to extend Mura
So when use them? If planning to distribute Providing large or
complex functionality
Why use Mura Plugins?
Update safe Packaged and organised Easily distributable Licensing exception Framework-friendly
FW/1, Model-Glue, etc.
Credit: “Anatomy of a Mura Plugin” presentation – Sean Schroeder, Blue River Software
So how is it done?
Follow a standard file / directory structure
Package as a zip file Upload via the Mura Admin interface
The simplest example contains 3 files
A simple plugin
config.xml.cfm
dspHelloWorld.cfm
Build and install
Deployed as a zip file I prefer to use ant from within Eclipse
to package the plugin But you can create it any way you wish
My ant build.xml is available on github Link will be at end of slides
Demo 2 - More advanced
The previous example was interesting, but not very useful
Let’s hook up our plugin to Mura… …via events
Introducing the Mura Scope
Provides a standard, concise syntax for interfacing with Mura objects (and their properties and events).
Accessed as the “$” variable We’ll see an example of this shortly
Introducing the Mura Scope
Provides a standard, concise syntax for interfacing with Mura objects (and their properties and events).
In admin area Must include plugins/config.cfm to obtain
access to this
When included in Mura page Automagically available
More about PluginConfig
The <settings> element
Contains settings that the plugin requires to function
Specified by the user during plugin install
Accessed programatically via pluginConfig.getSetting(‘settingName’)
The <settings> element
EventHandlers
Map to Mura events, or events announced in your plugins
Mura has an extensive event model –more info in links at end of slides
Set up in config.xml.cfm:
EventHandlers (cont)
Plugin.cfc
Allows you to run code that is needed to properly install, update or delete a plugin
Plugin.cfc must extend mura.plugin.plugincfc
An example
See demo3/plugin/plugin.cfc
Resources
Mura – http://getmura.com
Mura Marketplace -http://www.getmura.com/marketplace/
Grant Sheperthttp://www.grantshepert.com/
Resources (cont.)
Source code for demos –https://github.com/am2605/cfoanz-2011-mura-plugins
Twitter: @am2605 Email: [email protected]
Questions?
Thank you!