We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31338
    • 30 Posts
    I have a website that has 5 different CSS colour templates, When i create a new document i want to select a dropdown and choose say Red then whe the page loads it pulls the red.css into a tv called [[+css_colour]]

    <link href="assets/templates/css/[[*css_colour]]" rel="stylesheet" type="text/css" />


    when the page loads it will show red.css instead of [[+css_colour]] or which ever colour is selected.

    Thanks
      Use our Free Developers API and build SMS in to your customers website or store or application. http://www.VibeActiveMedia.com
      • 31338
      • 30 Posts
      its a problem, when i load the page the relevant css fie is not passed to the template
        Use our Free Developers API and build SMS in to your customers website or store or application. http://www.VibeActiveMedia.com
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        For one thing, [[+...]] is for placeholders, not TVs. But since you show [[*...]] in the actual link, it should work.

        1. Are you sure that the TV is connected to the template being used?
        2. Are you sure the TV name is correct (spelling and Case is important)?
        3. Are you sure that a .css file by the name the TV returns exists in that location?
        4. What does a "view source" of the page show for this link in the browser?

        For a nice way to handle this, using radio buttons, see http://sottwell.com/tv-input-types.html. While this is written for Evo, the principle of using radio button TVs remains the same.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 31338
          • 30 Posts
          Thank you that worked following your link, just one thing you mentioned putting .tmplvars br {display: none;}
          in the css file, i am using Rev 2.1 so the file location doesn’t appear to be the same.
            Use our Free Developers API and build SMS in to your customers website or store or application. http://www.VibeActiveMedia.com
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Well, that was just to prevent the radio buttons from being vertical instead of horizontal. I have no idea whether Revo has them generated in the same way. But it has nothing to do with the functionality.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org