-
- 2,877 Posts
WoooT! Nice tip!!
-
- 55 Posts
Thank you, alik, for your elegant snippet and kind words on my idea. It worked instantly and above expectation.
-
- 11 Posts
Hi Guys,
I’m a newbee in the modx world, and i think that I’m looking for a similar solution without getting the same results (ie I’m not getting any image URL).
I’m thinking that I’m missing a part here (maybe pulling in the TV so ditto on the parent page can list them out?)
I have:
1. Created a TV for my image - working fine
2. Added in the snippet
3. Added this to the chuck (called as the template in Ditto)
<image src="[[get_fck_thumb? &image=`[+advert-image+]`]]" />
Placed this ditto call on the container page:
[!Ditto? &id=`marketplace` &dateFormat=`%d - %b - %Y` &dateSource=`pub_date` &tpl=`marketplace` &parents=`67` &dateFilterDefault=`1`!]
Any guidence would be very much appreciated.
-
- 2,877 Posts
- Does the ditto call with chunk itself work, does it list documents?
- Does the snippet
[[get_fck_thumb? &image=`[*advert-image*]`]]
work on a page with that TV?
- Are the thumnails created in the image folder?
-
- 11 Posts
Hi,
The ditto call works yes
Thumbnails are being created - yes
I can also pull the normal large image from the TV through to the Ditto call from within the chunk
I think the problem is with the snippet.
I wonder if it has something $image variable within the snippet? Should this variable $image related to the name of my TV (advertImage) in any way? or is this variable a default variable for TV image uploads?
Thanks for trying to help by the way - much appreciated.
-
- 2,877 Posts
Did you try my change code with change ** instead of ++ on a page
just pasting it into the resource content field or in your template?
//
- Go back to the snippet and look for double ?> ending! That would break it.
- Make sure you named the snippet get_fck_thumb
-
- 11 Posts
Hi,
@mrhaw
Yes i have tried both of these options in the content of the page to test :
[[get_fck_thumb? &image=`[+advertImage+]`]]
and
[[get_fck_thumb? &image=`[*advertImage*]`]]
(Note, I removed the dash of the TV name just to test)
I had double checked the snippet name was correct with no spaces etc.
@tkfm
Hi, sorry yes, I had removed that, but was still not getting the thumb path when viewing the source code