We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21483
    • 32 Posts
    Hello content managers!

    Does a module/plugin/snippet that allows a non-privileged user to change CSS on the fly on the site the user is vistiting? Of course, the changes should only apply to the user that makes the change.

    I have done something similar with success with JavaScript and HTML.
      • 7455
      • 2,204 Posts
      Did you at all take a look at the resources pages?

      if you did that you would have found this:

      http://modxcms.com/resource-listing.html&tags=css
        follow me on twitter: @dimmy01
        • 21483
        • 32 Posts
        Thing is I don’t have any idea how to get it working. The explanation doesn’t help me much, it seems to require some experience.
          • 21483
          • 32 Posts
          With this code pasted into my template I get to choose from only one style sheet, namely Default css.

          I don’t think it’s my default.css style sheet it lists. I have two sheets, default.css and default2.css - not on the list.

          In the snipped code i’ve changed the following:

          // Configuration

          $csspath = ’/assets/templates/chitchat/’;
          $cssprintpath = $csspath;
          $cssdef = ’default’;
          $cssign = ’print’;
          $hlist = 0;
          $cssprintprefixe = ’print_’;

          What should I change to get it showing my sheets?
            • 7923
            • 4,213 Posts
            Do you have &parsefolder=`1` in the snippet call? What is your snippet call?


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 21483
              • 32 Posts
              My snippet call is:

              [!cssswitcher? &defaultcss=`site` &display=`1`!]

              So answer is no rolleyes

              Parsefolder will do it?
                • 21483
                • 32 Posts
                If i add &parsefolder=`1` then the list shows up completely empty. Take a look: http://www.kreativpotens.dk/modx
                  • 7923
                  • 4,213 Posts
                  Try

                  $csspath = ’/modx/assets/templates/chitchat/’;


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                    • 21483
                    • 32 Posts
                    Quote from: doze at Mar 01, 2007, 11:49 AM

                    Try

                    $csspath = ’/modx/assets/templates/chitchat/’;

                    Man Doze you are the MAN! kiss kiss kiss
                      • 21483
                      • 32 Posts
                      Thing is, now my style sheets actually show up on the list, but the changes doesn’t apply after picking the sheet.

                      The default2.css should make the body background black and the header double size. It doesn’t. Why is that?