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
<!--- | |
Use to display mobile specific content (assumes you have an attribute called 'mobilebody') | |
---> | |
<cfset mybody = request.muramobilerequest == 1 | |
&& YesNoFormat(m.content('hasmobilebody')) | |
&& Len(m.content('mobilebody')) | |
? m.content('mobilebody') | |
: m.content('body') /> |
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
<displayobject name="YouTube Video" contenttypes="*"/> |
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
<!--- Force Image Resave for All Images ---> | |
<cfset application.serviceFactory.getBean('fileManager').rebuildImageCache(siteid='YOURSITEID')> | |
<!--- or to just reset a specific image size you can use ---> | |
<cfset application.serviceFactory.getBean('fileManager').rebuildImageCache(siteid='YOURSITEID' ,size='YOURSIZE')> |
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
SET @someVar = 'someValue'; | |
SELECT * | |
FROM t_sometable | |
WHERE CASE @someVar <> '' THEN someColumn = @someVar ELSE someColumn = '' END; |
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
<cfoutput> | |
<cfscript> | |
updateVersion = application.autoUpdater.getProductionVersion('SiteID'); // this would be done for each SiteID (e.g., default, etc.) | |
currentVersion = application.autoUpdater.getCurrentVersion(); | |
readyForUpdate = updateVersion > currentVersion; | |
</cfscript> | |
<p>Mura's AutoUpdater works simply by comparing the <strong>updateVersion</strong> with the <strong>currentVersion</strong>. If the <strong>updateVersion</strong> is greater than the <strong>currentVersion</strong>, then it's ready for an update. This would be done on a site-by-site basis, and the updates differ between <strong>Core</strong> and <strong>Site</strong> versions.</p> |
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
/** | |
* Vertically center Bootstrap 3 modals so they aren't always stuck at the top | |
*/ | |
$(function() { | |
function reposition() { | |
var modal = $(this), | |
dialog = modal.find('.modal-dialog'); |
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
<div class="form-group col-md-6"> | |
<label for="somedate">Some Date</label> | |
<div class="has-feedback"> | |
<input class="form-control" name="somedate" id="somedate" value=""> | |
<span class="form-control-feedback"><i class="fa fa-calendar"></i></span> | |
</div> | |
</div> |
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
<!--- | |
A brief example on how to use the 'CustomUI' option when creating a class extension in Mura CMS. | |
This example assumes you have an extended attribute called 'Page/Book'. | |
It also assumes you have an attribute set using the 'CustomUI' container/tab assignment. | |
Any extended attributes you assign to the attribute set, you are responsible for collecting | |
that data using your own form fields. Make sure the 'name' and 'id' attributes match the | |
names you've used when you created the extended attributes! For example, if you have an | |
extended attribute with a name of 'bookPublisher', make sure you have a form field with an | |
'id' and 'name' attribute of 'bookPublisher'. Check your casing too! |
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
<!--- | |
First, create an extended attribute for Base/Default called 'arabicBody' | |
---> | |
<cfset arabicBody = $.setDynamicContent($.content('arabicBody')) /> | |
<cfif Len(arabicBody)> | |
<div dir="rtl" lang="ar"> | |
#arabicBody# | |
</div> | |
</cfif> |