We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51285
    • 11 Posts
    Hi all,

    I'm new to modx and web development in general and looking for some help.

    I wan't to create a TV that makes it possible to change background image for the hero section of some templates. I have looked around for tutorials or info but hitting a brick wall. If you know a way to do it or can point me in the direction of some good resources that would be awesome.

    On a side note is the "MODX: The Official Guide" book worth getting. Has good reviews on amazon but is a few years old now so was wondering if it is out of date or is it still a useful resource. I'm looking to use modx as my CMS of choice and a good guide book is always useful smiley

    Thanks

    James

    This question has been answered by sottwell. See the first response.

    • discuss.answer
      The book is also available as an e-book, which is more up-to-date. In any case, the book is definitely still useful.

      You should also join the Slack community. https://modx.org/

      There are several ways you can use a TV for CSS values.


      1. Use a CSS resource instead of a file, just change its content type to text/css in its Settings tab. Assign it to a special template which should be empty - but not the (empty) template - it just acts as a holder for the TV. This resource will be processed like any other resource, including any TVs attached to its template.
      2. Use a small style block in the head of your templates to specify the background-image only; the rest of the style will be in the .css file as usual.
      3. Use cssSweet to manage your CSS https://rtfm.modx.com/extras/revo/csssweet/ (my preference, although I use a customized version of cssSweet)
        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
        • 51285
        • 11 Posts
        Thanks for the helpful reply Susan. Will check out csssweet. Also i joined the Slack community, I'm sure i'll be asking for help on there too smiley