Skip to content

Instantly share code, notes, and snippets.

@brh55
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brh55/382da8ba1cb2106a00df to your computer and use it in GitHub Desktop.
Save brh55/382da8ba1cb2106a00df to your computer and use it in GitHub Desktop.
Optimized methods for Color Theming in MODx | PMACS TEAM | #modx #optimize
Key: colortheme
Label: Color Theme
Description: Choose your desired color theme.
Group: Publishers (drop down)
Field Type: Selectbox (drop down)
Value: blank
Field Options: Make sure to set your default value to your default CSS file. Then set your color themes equal to the name of your cssfile. To do this, seperate the themes by a pipe. Also, it is case sensitive to your css file, so keep that in mind.
Example: Default==override||Light==light-theme||Galaxy==galaxy-theme
Setting is required: Check
<link rel="stylesheet" href="assets/design/css/[[++colortheme]].css">'
<!-- Default Theme -->
[[If?
&subject=`[[++colortheme]]`
&operator=`EQ`
&operand=`Default`
&then=`<link rel="stylesheet" href="assets/design/css/override.css">`
]]
<!-- Light Theme -->
[[If?
&subject=`[[++colortheme]]`
&operator=`EQ`
&operand=`Light`
&then=`<link rel="stylesheet" href="assets/design/css/light-theme.css">`
]]
<!-- Dark Theme -->
[[If?
&subject=`[[++colortheme]]`
&operator=`EQ`
&operand=`Dark`
&then=`<link rel="stylesheet" href="assets/design/css/dark-theme.css">`
]]
<!-- Additional Themes -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment