We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6973
    • 6 Posts
    I admit that I am new to MODx and still reading through the documentation, but as of yet I have not found any mention of including several external style sheets in a template. The path setting appears to require an actual file name as opposed to a simple path.

    Does MODx allow for multiple style sheets, and if so, how do I adjust the setting to allow it. When I build sites, I usually have two style sheets links, e.g.:

    <link href="../assets/css/main-en.css" rel="stylesheet" type="text/css" media="all" />
    <link href="../assets/css/main-print.css" rel="stylesheet" type="text/css" media="print" />

    However if I am reading the documentation correctly, a given site within MODx can only have one style sheet.

    I would appreciate any clarification on this matter should anyone know.

    Thanks.
      • 4095
      • 372 Posts
      Quote from: DeLaHelias at Mar 16, 2006, 01:22 AM

      Does MODx allow for multiple style sheets, and if so, how do I adjust the setting to allow it. When I build sites, I usually have two style sheets links, e.g.:

      <link href="../assets/css/main-en.css" rel="stylesheet" type="text/css" media="all" />
      <link href="../assets/css/main-print.css" rel="stylesheet" type="text/css" media="print" />

      However if I am reading the documentation correctly, a given site within MODx can only have one style sheet.

      No reason for it not too work. Just add them to the template. If you have troble with the paths, you could use <link href="[(site_url)] assets/css/main-en.css"
        [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
        Admin Sandbox Login: sandbox Password: castle
        • 32241
        • 1,495 Posts
        The best practice will be to add this on the template, and place it inside <head></head> tag.
        <base href="http://your-modx-domain.com/" />
        


        DeLaHelias , There is no limitation in templating with MODx, other than your knowledge in (X)HTML and CSS.
        The reason why I say this, because you can put whatever html design that you want as a new template, and use it for your site template. All the dynamic contents will only replace the MODx tag located on your template. So if you create a new template, put [*content*] tag on the right place on where you want your main content to be displayed on every page correspond to the template. That content tag is just an example, more about some other tags that you can use, you can read it through documentation provided, or you can take an example of the basic template included with MODx. You can see that, there are only a few tags that will be added into a plain ordinary (X)HTML layout.
          Wendy Novianto
          [font=Verdana]PT DJAMOER Technology Media
          [font=Verdana]Xituz Media
        • Check out the YAML template, it uses multiple stylesheets. Stylesheets in MODx behave exactly the same as they do in any (X)HTML page.
            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