We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32017
    • 151 Posts
    i need to include a css style sheet to one of my documents and not the others

    im thinking i can use an if statement in side a template for the call ?

    [if document id = x , show style1.css, else style2.css ]

    whats the best way to do this?
      London web design - MODx specialists
      • 25663 MODX Staff
      • 12,272 Posts
      Is there a lot of overlap in the two stylesheets? If so, there may be better ways to achieve your goal.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 32017
        • 151 Posts
        Its badly effecting one of the important pages. being a third party script "modernbill" its not really wise to start hacking their css .

        i couldn’t just make a new template and do the css include that way , but would prefer to just see if there is a quick query ? if not then its no worries ill have to just make a separate template.
          London web design - MODx specialists
          • 25663 MODX Staff
          • 12,272 Posts
          I’ve not had problems redoing Modernbill’s css in the past, but I certainly understand the desire to not mess with it. You could do a separate template (what I’d suggest) or you could modify the membercheck snippet to check the doc ID instead of the logged in status to do what you want.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 32017
            • 151 Posts
            blah, got rid of all default snippets smiley only wayfinder is the best ! Ive done it now using a new template sad but it does the trick.

            cheeeeers cool
              London web design - MODx specialists
              • 10573
              • 101 Posts
              Try PHX for conditional statements.