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

    As of a few days ago, I chose MODx as my CMS of choice. However, I’ve jumped in the deep-end somewhat as my web coding is lacking so go easy on me. I am a programmer btw, just not much of a ’web’ coder, I thought it was about time I improved my knowledge.

    Now the first thing I want to do on my webpage is display an image. Now my question is simple, does MODx handle references to image files or do I have to path images manually in the code? For instance, do I upload my image in the MODX manager page and use a keyword to access it’s path in the code? Or is this a manual process?

    Sorry if this is obvious, I’m just trying to get to grips with things.

    Thanks.

      • 19369
      • 1,098 Posts
      Not sure if I’ve understood completely your question, but here is a way to add a image (with MODx Evolution, but with Revolution is almost the same):

      1)Go to Elements > Manage Elements > Template Variables > New Template Variable

      2)Choose this settings:
      Template Variable Name: img01
      Caption: Image 01
      Input Type: Image
      Template Access: Choose your current template

      3)Open your template (Elements > Manage Elements > Templates) and add this <img src="[*img01*]" alt="#" />
      4) Open the resource and add a image to see if it works.

      Alternatively, you can just upload and display an image in the content area with the Wysiwyg Editor.
      Hope that this answer your question.
        • 12563
        • 2 Posts
        Thank-you very much for the clear explanation, it does indeed answer my question.
        grin