We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Do a "View source" on the page and see where it's looking for the CSS file. Then compare that with the actual file location. If the .css files are in the styles directory, you probably want this style for the TV:

    Brown==brown.css||
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 35082
      • 57 Posts
      "View source" shows this:

      <link href="assets/template/advanced/styles/default/default.css" rel="stylesheet" type="text/css" />
      
      which is the value in the Default Value field of the TV
      but the selector in the TV is set to Green
        • 3749
        • 24,544 Posts
        The TV value may not be set at the time the chunk is parsed. You could try calling the TV tag uncached like this:

        [[!*cssSelector]]


        Or you could just put the CSS href in the template itself, which would be more efficient.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 35082
          • 57 Posts
          Tried it both ways Bob, in the header chunk, and in the template itself, with and without the caching. Still not working.

          Now my original setup isn't working anymore, hope I didn't break anything, gotta get it back right.
            • 3749
            • 24,544 Posts
            I can't think of anything that would explain that. If the TV name were wrong or it was not attached to that template, it would have no value. And it would never get the default value if there was a value set for that resource.

            I would got to PhpMyAdmin and look in the modx_site_tmplvar_contentvalues table to see if the values are really there. The contentid field will be the ID of the resource and the value field will show the setting of the TV for that resource.

            Are you sure you have save permission for template variables and no Form Customization rules are set for that TV? I guess it's also possible that your input option values are malformed or that it doesn't like the / character.

            You did remember to save the resource after setting the TV, right?
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 35082
              • 57 Posts
              yes I did save the resource, but I think that may be where the issue is. I used the same css resource I created to have access to that color.css file. It has the content type: css.

              I will create a fresh resource and try to see if the TV works with it, using html as content type.
                • 3749
                • 24,544 Posts
                Yes, that might keep the TV from being processed correctly.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 35082
                  • 57 Posts
                  Well still not working. I've reverted back to the initial setup I had and at least I am able to change colors again that way.

                  Gotta hit the books again and try to figure this out, the concept seems so simple. It just has to work Bob, know what I mean?

                  Calling it a night for now. Thanks for all your help guys, it's really appreciated, trust me.
                    • 22840
                    • 1,572 Posts
                    Have you tried the way I said, I know that works as I use it on my site to select facilities ;o)
                      • 33974
                      • 156 Posts
                      Heya,

                      I do it with a body class and only one css-file. In there there are my different selectors for each color:

                      <body class="light">
                      …
                      

                      .light>#myid1>ul>li>a{
                      	color: #CCC;
                      	background: #FFF;
                      }
                      .dark>#myid1>ul>li>a{
                      	color: #FFF;
                      	background: #000;
                      }
                      

                      setting class with a TV (select)