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

    I need to add a new field in each page in admin panel somewhere between ’title’ and ’long title’, I need to upload a JPG file for each page and to use this image as a header. What would be the shortcut of implementing what I need?

    Thanks
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      It would be much better if you used a TV with the input type Image. You still use the [*tvname*] tags just as you would any other [*...*] document variable tags.

      For advantages to this are
      1. A field to upload an image
      2. The ability to use an output widget to format the image tags (without this you just get the path to the image)
      3. A default value if no image is specified on any page
      4. the @INHERIT binding as the default value will allow an editor to select an image for one document, and all of its children will inherit that same image.

      Oh, also you don’t have to hack the core files to add fields to the main editing area.
        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