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

    I´m building a small API to be used on a mobile App. I´m using getResources, getUrlParam, getImageList to do all the stuff. I´m nearly there, but now i´m having troubles in get cached images from phpthumbof... he´s returning the original images instead of the cached ones!!!

    The problem is that the phpthumbof inside on ApiSlideshowTpl ins´t working as expected. I´m calling this Tpl with the GetImageList snippet, inside on the GetResources Tpl.

    The phpthumbof snippet it´s giving me ex. "/assets/images/featured/party_small.jpg", instead of "/assets/components/phpthumbof/cache/party_small.c5d15c8bcf5fb00234611a1506fd956d.jpg". Why???

    Below you can find the code i´m using:

    Main getResources Call

    [[!getResources? 
    &parents=`[[getResourceField? &id=`[[!getUrlParam? &name=`docId` &default=`1` &int=`1`]]`]]`
    &resources=`-13,-18,-156,-75,-81,-166, [[!getUrlParam? &name=`docId` &default=`1` &int=`1`]]`
    &limit=`0`
    &depth=`0`
    &sortby=`menuindex`
    &sortdir=`ASC`
    &tplWrapper=`ApiWrapperTpl`
    &tpl=`ApiSingleResourceTpl`
    &includeTVs=`1` 
    &includeContent=`1`
    &hideContainers=`0`
    &processTVs=`1`
    &outputSeparator=`,
    		`
    ]]
    



    ApiSingleResourceTpl

    {
    			(...)
    
    			"media" : {
    				[[+tv.slideshow:isnot=``:then=`
    				"slideshow" : [
    					[[!getImageList? 
    					&tvname=`slideshow` 
    					&tpl=`ApiSlideshowTpl` 
    					&docid=`[[+id]]´ 
    					&processTVs=`0` 
    					]]
    				],
    				`:else=`"slideshow" : [],`]]
    				[[+tv.static-image:isnot=``:then=`
    				"banner" : "[[+tv.static-image]]"
    				`:else=`"banner" : ""`]]
    			}
    
    			(...)
    



    ApiSlideshowTpl

    "[[+image:phpthumbof=`w=120&h=120`]]"
    



    Many thanks in advance

    This question has been answered by legues. See the first response.

    [ed. note: legues last edited this post 8 years, 5 months ago.]
    • discuss.answer
      • 16899
      • 284 Posts
      Hi Guys

      If you have the same problem that i had... you can find the solution here:
      http://forums.modx.com/thread/88392/phpthumbof-not-working?page=2

      Regards,
      Nuno