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

    I’m new to the Modx Community - so sorry if my question repeats a previous post. I have searched about!

    My first Modx Project is building an online resource centre / blog. Everything is running smoothly so far.

    The homepage contains ’feature’ boxes that contain the last 3 posts in a particular section, and a featured post with image. All of this has been achievable by using ditto:

                            <!-- featured links -->
                            <div class="featured-links">
                            	<h3>Recent Reviews</h3>
                                <ul>
    [!Ditto? &parents=`4` &depth=`3` &display=`3` &tpl=`li_spa_latest_tpl`l!]
                                </ul>
                            </div>
                            
                            <!-- featured article -->
                            <div class="featured-article">
                            	<h3>Featured Spa</h3>
    [!Ditto? &parents=`4` &depth=`3` &total=`1` &tpl=`fb_featured_spa` &randomize=`1`l!]
                            </div>
                            <div class="clear"></div>
    
                        </div>
                        <div class="bottom"></div>
                    </div>
    


    I’ve become lost where I need to introduce TV’s. Each of the posts I’m summarizing contain a TV for an image & alt text. The TV tags show up fine on the article itself, however don’t seem to show up when I pull them through to the homepage.

    I’m pulling the same chunk through Ditto that contains the TV’s on the homepage and the article itself:

                                <a href="#"><img src="http://mydomain.com/[*tv_spa_image*]" alt="[*tv_spa_image_alt*]"/></a>
                                <h4><a href="[~[+id+]~]" title="[+title+]">[+title+]</a></h4>
    


    but the TVs (article image) don’t show up on the homepage!

    Could anybody point me in the right direction?

    Many thanks

    Jon
      • 36592
      • 970 Posts
      Try
      <img src="http://mydomain.com/[+tv_spa_image+]" alt="[+tv_spa_image_alt+]"/>

      in your Ditto template.
        • 31961
        • 23 Posts
        Thank you so much! Thats done the trick. grin