We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27889
    • 415 Posts
    This tips permit to modify your site colors as easy as modify only one chunk (one per color), it display the color palette in the chunks list.
    Requirement :
    use of CSS (normally done with all really web developper :p)
    don’t serve CSS as external file, you can serve CSS as document like explained http://modxcms.com/forums/index.php/topic,4201.0.html"" target="_blank" rel="nofollow">here
    or use chunk, snippet, TV ...

    First we create one chunk per color used:
    ressources-new chunk:
    name of the chunk:enter the name of the color: color1 or bright-blue or whatever you want.
    description of the chunk:type this: #D4D0C8<span style=’background-color:#D4D0C8’>______</span>
    edit:
    Use single quote in version before 0.9.5 because double breaks the display.
    In the 0.9.5 version double quote : " work well.
    replace all the #D4D0C8 with your color value: rgb name or web color name (white, pink, black ...)
    source of the chunk:enter the color in css format :rgb (#ffffff, #aabbee) or name or web color name (white, pink, black ...)

    In your CSS :
    You use your chunks color defined early and insert them as usually:
    [tt]h1 {
    color: {{the_name_of_the_chunk}} ;
    background-color: {{the_name_of_another_chunk}} ;
    }[/tt]

    The easy editing
    In the ressources - chunk page you can see the name of the chunk (to be inserted), the color value and a small background with the color. (See the following image.)
    I keep a page with my chunks list and an other to edit my CSS.
    Now if you want to modify a color you just need to edit the desired chunk color and all your site will follow. (don’t forget to edit the chunk’s description)
    PS: In 0.9.5 MODx version, you will be able to group your chunks, so the list don’t become too long.

    You can use this for css fonts too.
    Hope this can help.
      MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
      MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]