-
- 45 Posts
Hi all
I am slightly confused with Media Sources. I have a template that has an image TV that lets the user choose an image from the folder:
/assets/files/...
In Tools -> Media Sources I have set up the baseUrl as 'assets/files'.
When I choose an image it shows the thumbnail correctly.
Now in the template page I am trying to resize the image using phpthumbof but when I output the TV it is simply images/MYIMAGE.jpg - it is missing the baseUrl at the start??
How do I get this to include the baseUrl in the TV so it outputs:
assets/files/images/MYIMAGE.jpg
Any ideas?
Thanks,
Stewart
I am having the same issue on one website but not on another, anybody know how to output the baseURL with the images?
MODX Ambassador for Thailand. Managing Director at
Monogon, a web design and development studio based in Bangkok, Thailand. -
Follow me on Twitter.
-
- 4,149 Posts
Are you using getResources, or just outputting directly?
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
The problematic site's setup is using a static resource for the template, then a getResources call for the product listing and then phpThumbs for the image TVs.
The Media Source is set to assets/images/products/ when an image is selected in the back-end it adds a "./" to the url like this: "./07-SSGOLD-Large.jpg" and displays the thumbnail correctly, then on the front end it only displays example.com/07-SSGOLD-Large.jpg
MODX Ambassador for Thailand. Managing Director at
Monogon, a web design and development studio based in Bangkok, Thailand. -
Follow me on Twitter.
-
- 45 Posts
Yes, this is via a getResources call on some pages.
Also, it is used as [[*myimage]] on the resulting page.
-
- 4,149 Posts
You need to make sure the TV is processed, using &processTVs=`1`
You can use &processTVList to specify which TVs to process, as well.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
I am having the same issure, but also even when I just call up the image TV using the phpthumbof snippet, it is still not processing the image. I looked into the error logs and it is incorrectly naming the path of the original image.
I posted about it already here:
http://forums.modx.com/thread/31485/problems-with-phpthumbof?page=2#dis-post-415103
[[*newsImage:phpthumbof=`w=564&h=300&zc=1`]]
Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.