We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7527
    • 437 Posts
    Hi, I am trying to create something I saw on an old thread. Basically rendering some thumbnail pics via Ditto
    I have created a template variable named factfilethumb
    Next I added this snippet:
    <?php
    if (isset($image) && file_exists($image)) {    return (file_exists($thumb = preg_replace('#([^/]+)$#', '.thumb_$1', $image)) ?        $thumb :        $image    );}
    ?>

    and named it get_fck_thumb
    Then I added this call:
    [[Ditto? &id=`pictures` &dateFormat=`%d - %b - %Y` &dateSource=`pub_date` &tpl=`pictures` &parents=`70,80` &depth=`3` &display=`5`]] 

    My chunk named pictures contains
    <image src="[[get_fck_thumb? &image=`[+factfilethumb+]`]]" /> 
    


    I am using Evo 1.0.4. Am I doing something wrong? It returns 5 tiny squares that have a bmp or jpeg logo, and are only apout 10px square
    Thanks
    Seb
      www.PawsForWildlife.co.uk
      www.Borntobrick.co.uk
    • In a "view source" of the page, what does it have where the image should be?
        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
        • 7527
        • 437 Posts
        Hi Sottwell,

        It it shows is this
        <image src="" /> <image src="" /> <image src="" /> <image src="" /> <image src="" /> 


        I wanted to create a related article theme, abit like Revolutions getRelated. I know with Ajax you can use &Rank which would be perfect to display 'like' articles.

        An example of what I want to acheive can be seen here:
        http://a-z-animals.com/animals/polar-bear/

        The related articles are on the bottom right is what I am after (although I want to create it horizontally). Any ideas?
          www.PawsForWildlife.co.uk
          www.Borntobrick.co.uk
          • 7527
          • 437 Posts
          Sorry to continue this thread, but has anyone had any luck with this? I am still unable to produce the thumbnails and dont know why?
          Regards
          Seb
            www.PawsForWildlife.co.uk
            www.Borntobrick.co.uk