Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #7 from stevewithington/master

misc. updates to configurator.
Thanks Steve!
  • Loading branch information...
commit 151a26a11ae7add265b6b20133bae76a99e64132 2 parents 835bef3 + 5274e40
@mattlevine mattlevine authored
View
6 .gitignore
@@ -0,0 +1,6 @@
+*~
+*_notes/
+Thumbs.db
+.DS_Store
+/muraconfiguratorexample.sublime-project
+/muraconfiguratorexample.sublime-workspace
View
3  README.md
@@ -0,0 +1,3 @@
+This is an example [Mura CMS] (http://getmura.com) plugin to show how to create per instance display object configurators. It requires [Mura CMS 5.6] (http://getmura.com/download/) or higher.
+
+Please see the [Programmer's Guide to Mura CMS] (http://docs.getmura.com/linkservid/6E472481-58B6-4E41-B621113493FC3933/showMeta/1/) for more information on creating display object configurators.
View
29 displayObjects/configurators/configuredObject/configurator.cfm
@@ -1,4 +1,5 @@
-<!--
+<cfscript>
+/*
Copyright 2012 Blue River Interactive
Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,22 +13,20 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--->
-<cfscript>
- $=application.serviceFactory.getBean("MuraScope").init(session.siteID);
-
- params=$.event("params");
-
- if(isJSON(params)){
- params=deserializeJSON(params);
+*/
+ $ = application.serviceFactory.getBean('MuraScope').init(session.siteid);
+
+ if ( IsJSON($.event('params')) ) {
+ params = DeSerializeJSON($.event('params'));
} else {
- params=structNew();
- }
-
- if(not structKeyExists(params,"exampleParam")){
- params.exampleParam="";
+ params = {};
}
-
+
+ defaultParams = {
+ exampleParam = ''
+ };
+
+ StructAppend(params, defaultParams, false);
</cfscript>
<cfoutput>
<div id="availableObjectParams"
View
3  readme
@@ -1,3 +0,0 @@
-This is an example plugin show Mura plugin per instance display object conifgurators.
-
-It requires Mura 5.6 or higher.
Please sign in to comment.
Something went wrong with that request. Please try again.