outputMuraCSS
A Mura Scope helper method to dynamically output links to Mura's stylesheets to account for basic styling of Mura-generated output. Just to clarify, including Mura's CSS is completely optional. However, using it can save you loads of time in the long run.
Function Syntax
m.outputMuraCSS( version , includeskin , complete , useprotocol )
Parameters
Parameter | Type | Req/Opt | Default | Description |
---|---|---|---|---|
version | string | Opt | 7.1 | A string to allow for backward-compatibility. For example, if your theme was originally created for 7.0, you may pass "7.0" as the value. However, keep in mind that prior versions of Mura's CSS may not account for newer Mura-generated markup. |
includeskin | boolean | Opt | true |
If |
complete | boolean | Opt | false | If true , Mura will include the domain for the "href " attribute(s) of the auto-generated <link> elements. If false , Mura will omit the domain, and include the absolute path to Mura's CSS. |
useprotocol | boolean | Opt | true | If true , and complete=true , Mura will include the "protocol" for the "href " attribute(s) of the auto-generated <link> elements. For example, <link rel="stylesheet" href="https://yourdomain/..."> . |
Usage
Use this function to include Mura's own CSS for basic styling of Mura-generated output.
Example
The following example outputs Mura's CSS
<cfoutput> <!--- Always include this _before_ any custom CSS ---> #m.outputMuraCSS(version='7.1', includeskin=true)# <!--- Custom CSS should go here ---> </cfoutput>
Illustrated below is an example of a theme without Mura-generated CSS.
Below is an illustration of the same example as above, using Mura-generated CSS.
The differences are even more noticeable when you are creating a custom theme from scratch.