This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- add/edit these in your settings.ini.cfm ---> | |
filestore=s3 | |
filestoreaccessinfo=access Key ID^secret Access Key^bucket-name | |
filedir=s3://myAccessKey:[email protected]/bucket-name/folder | |
assetpath=http://s3.amazonaws.com/bucket-name/folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Add this to your config.xml.cfm ---> | |
<!--- Extend Page/Default. You can also choose to extend Base/Default for all objects ---> | |
<extension type="Page" subType="Default"> | |
<attributeset name="Crawling" container="default"> | |
<attribute | |
name="disableCrawling" | |
label="Disable Crawling" | |
hint="Prevent this page from being indexed by search engines" | |
type="RadioGroup" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Add to the top of your page body in the template ---> | |
<!--- Facebook Share Script ---> | |
<div id="fb-root"></div> | |
<script>(function(d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); js.id = id; | |
js.src = "//connect.facebook.net/en_US/all.js##xfbml=1&appId=xxxxxxxxxxxxx"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'facebook-jssdk'));</script><!--- End Facebook Share Script ---> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Get the parent of a page ---> | |
#$.content().getParent()# | |
<!--- Get the Paren't title ---> | |
#$.content().getParent().getTitle()# | |
<!--- Get the Parent's image ---> | |
#$.content().getParent().getImageURL('large')# | |
<!--- You could also simply set the parent in a variable and grab the objects accordingly ---> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Sometimes you need to output the contents of an iterator multiple times. For example, for a slider with navigation, you may want to output the links as an unordered list and the images as divs ---> | |
<cfoutput> | |
<cfset feed=$.getBean("feed").loadBy(name="Feed Name",siteID=$.event("siteid"))> | |
<cfset iterator=feed.getIterator()> | |
<cfif iterator.hasNext()> | |
<ul> | |
<!--- The list ---> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- In a Mura page template ---> | |
#$.getURLForFile(filename=$.content('extAttribute')# | |
<!--- In a Mura component ---> | |
#$.getURLForFile(filename=$.component('extAttribute')# | |
<!--- In a Mura iterator ---> | |
#$.getURLForFile(filename=item.getExtAttribute())# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Add to site Content Renderer ---> | |
<cffunction name="feedList"> | |
<cfargument name="columnName" type="string" required="Yes"> | |
<cfargument name="delimiter" type="string" default=","> | |
<cfset var q = application.feedManager.getFeeds(siteId = $.event('siteId'),type='Local')> | |
<cfreturn arrayToList(q[arguments.columnName].toArray(), arguments.delimiter)> | |
</cffunction> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Create new Slatwall Object Programatically ---> | |
<cfset newBrand = $.slatwall.newEntity('Brand') /> | |
<cfset newBrand.setBrandName("Hello World") /> | |
<cfset newBrand.setURLTitle("hello-world") /> | |
<cfset newbrand = $.slatwall.saveEntity( newBrand ) /> | |
<!--- Update existing Slatwall Object Programatically ---> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Assuming you have a url query called "sku", i.e. ?sku=12345678 ---> | |
<!--- load product options by predefined SKU ---> | |
<cfset defaultSelectedOptions = $.slatwall.getEntity('Sku', 'url.sku').getOptionsIDList() /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Assuming you've created an extended attribute 'File' type called 'extAttributeImage' ---> | |
<!--- In a Mura Page Template ---> | |
#$.createHREFForImage(filename=$.content('extAttributeImage'),size='myCustomSize')# | |
<!--- In a Mura Component ---> | |
#$.createHREFForImage(filename=$.component('extAttributeImage'),size='myCustomSize')# | |
<!--- In the context of an iterator ---> | |
#$.createHREFForImage(filename=item.getExtAttributeImage(),size='myCustomSize')# |
NewerOlder