We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2349
    • 10 Posts

    Hi,

    I’m wondering. How would you implement per page CSS/JS definitions? At work we use Java,JSP,... which in we program the page itself with functions and all. As far as I can see, ModX uses a completely different approach.

    So, instead of creating a different template per page, how could this be implemented the best way? Any advice?


    thx,

    ATeX
      • 2349
      • 10 Posts
      sorry for bumping the thread. I believe I’ve found a theoretical solution.

      The point is to keep manager users from changing the site styling. So TemplateVariables are out of the question. This means each page with different functionality will need a separate template. And in order to keep code maintainable, these templates will have to use a snippet to load a series of CSS and JS files.

      Am I right?


      -ATeX
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: ATeX at Oct 18, 2008, 11:38 AM

        The point is to keep manager users from changing the site styling. So TemplateVariables are out of the question. This means each page with different functionality will need a separate template. And in order to keep code maintainable, these templates will have to use a snippet to load a series of CSS and JS files.
        I use Template Variables with @INHERIT for this myself; you can always restrict TemplateVariables from being rendered for different Manager User Groups in the backend.
          • 2349
          • 10 Posts
          Hi OpenGeek!

          Thank you for your very fast response! I’ll have to look into permissions again then. Using TV’s will ease the development a lot. smiley


          thanks again,

          ATeX