We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34027
    • 30 Posts
    I'm writing a CMP and I'm trying to make it possible for the user to customize the help screen.

    I'm currently abstracting it so that the help screen is in chunks. So obviously the user can override these if they want to change the help for a specific site, or if they want to remove the help entirely.

    However, I also need to specify some CSS for the help screen, and I want the user to be able to override the styles. What's the best practice for this? Do I put the CSS inline in the chunk where the user can edit it? Do I include a separate stylesheet, but have a system setting that allows the user to specify their own stylesheet?


      • 37743
      • 49 Posts
      From a full-blown-extra, best practice, extensibility point of view i'd suggest creating a system setting that pointed to a theme path (i.e. myCMP.themePath => /assets/components/myCMP/css/ ) and loads a specified filename (i.e. myCMP.style.css). This would allow users to override the style without hacking your extra's core.

      If you don't want to go that far, surely a chunk included between <style> tags would do?
        • 34027
        • 30 Posts
        Okay, cool - thanks. I think I'll go with <style> tags inside the chunk for now. I'll revisit the issue for version 2.