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

    Could anyone of you answer this. I’m already using ditto in a sense that when I make a document it will be displayed on it’s own page plus it goes straight to the front page. No problem.
    But what if i’d like to include image to that document, how could i do that?? So that the image would be shown in the documents own page (I.e Statements. . ) and on the front page aswell.
    Could it be possible to defy the maximum size of the image aswell, like in the chunk or so??
    I know...I’m not the one with the clearest questions, but i’ll hope that some will get this..
    Thanks in advance.
      • 5340
      • 1,624 Posts
      http://modxcms.com/forums/index.php/topic,20112.0.html

      I think this is what you want. At least a part of what you want smiley

      For now I am displaying the images on the home page inside an article list.(Title, Introtext and Image)
      For displaying the image on the it’s own page I think you can use the same template variable used on the first page

      on the first page put this chunk

      <div class="newsItem">
      [+img_news+]
      <a href="[~[+id+]~]">[+title+]</a>
      <p>[+introtext+]</p>
      </div>


      On the content page template just add the same TV used for the image [*img_news*] (Input Type: Image, Widget: Image)
      Let me know if the same image is displayed

      I am still investigating the possibility to specify the maximum width, height on the image. I think it might be possible to do it using the Input Option Values: but I haven’t got the time to investigate

        • 18830
        • 161 Posts
        Could it be possible to defy the maximum size of the image aswell, like in the chunk or so??

        Take a look at Metaller´s DirectResize plugin http://modxcms.com/forums/index.php/topic,19236 and own ImgageBlock snippet http://modxcms.com/forums/index.php/topic,20277.0.html.

        Because DirectSize is using relative paths and ImageBlock absolute paths you can define with PHx if your image will be shown in it´s original size or as a thumbnail.