We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27181
    • 3 Posts
    Here’s the scenario:

    Each of my blog posts have an associated image for design purposes.
    I create a template variable where I can insert the image embedding info so that it gets displayed in my blog post.

    So far so good!

    However, when using Ditto to call and display my lastest blog posts, I want to include the image in addition to the standard stuff like posted by, date, title, etc.

    How do I reference the image associated with each blog post, and defined by the template variable?
      • 7231
      • 4,205 Posts
      Add the placeholder for the TV in your Ditto Tpl. Place [+imageTvName+] in your custom tpl in the location where you want your image to show. You might need to add additional html depending on your output widget set for tht TV. If it has no output widget set you woul dneed to do something like this:
      <img src="[+imageTvName+]" title="[+pagetitle+]" />
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 27181
        • 3 Posts
        Quote from: dev_cw at Sep 03, 2008, 03:02 PM

        Add the placeholder for the TV in your Ditto Tpl. Place [+imageTvName+] in your custom tpl in the location where you want your image to show. You might need to add additional html depending on your output widget set for tht TV. If it has no output widget set you woul dneed to do something like this:
        <img src="[+imageTvName+]" title="[+pagetitle+]" />


        Thanks for the info. I’m testing this right now. Hopefully it’s going to work.