Last active
November 4, 2015 22:07
-
-
Save stevewithington/57f4947d19e05f5232ce to your computer and use it in GitHub Desktop.
Mura CMS: Example of how to show a different body region for mobile users.
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<mura> | |
<extensions> | |
<extension adminonly="0" availablesubtypes="" basekeyfield="contentHistID" basetable="tcontent" datatable="tclassextenddata" description="" hasassocfile="1" hasbody="1" hasconfigurator="0" hassummary="1" iconclass="" subtype="Default" type="Base"> | |
<attributeset categoryid="" container="Basic" name="Mobile Options" orderno="1"> | |
<attribute adminonly="0" defaultvalue="" hint="" label="Mobile Body" message="" name="mobileBody" optionlabellist="" optionlist="" orderno="1" regex="" required="false" type="HTMLEditor" validation=""/> | |
</attributeset> | |
</extension> | |
</extensions> | |
</mura> |
This file contains hidden or 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 the class extension using the config.xml.cfm file below FIRST ---> | |
<cfset myBody = cookie.mobileformat && Len($.content('mobileBody')) | |
? $.content('mobileBody') | |
: $.content('body') /> | |
#$.dspBody( | |
body=myBody | |
, pageTitle=$.content('title') | |
, crumbList=false | |
, showMetaImage=true | |
, metaImageClass='thumbnail' | |
)# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment