Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image TV's not working under different Media Source #15

Open
JayCarney opened this issue Sep 12, 2013 · 4 comments
Open

Image TV's not working under different Media Source #15

JayCarney opened this issue Sep 12, 2013 · 4 comments

Comments

@JayCarney
Copy link
Contributor

I have my default media source on TV's set to an Uploads directory, and while viewing the image browser everything works as expected, however when rendering in the front-end the image path isn't being appended with the path of the uploads directory. This is only happening on elementHelper Image TV's I've added via the JSON document.

I'm using MODX 2.2.9

@roryg
Copy link
Owner

roryg commented Sep 13, 2013

It took me a while to figure this out but apparently the type attribute in the JSON document needs to be lowercase. So if you have "type": "Image" change it to "type": "image" and it should fix it. You might need to refresh the modx cache as well.

@JayCarney
Copy link
Contributor Author

Thanks for the quick reply.
I was also trying to work out how to create MIGX TV's within the JSON file, but couldn't find any documentation on using "input_properties".

I tried passing the MIGX values for Form Tabs and Grid Columns but just couldn't get it to work. I tried setting input_properties to an array with indexes that match the names of the fields visible in the manager, but with underscores instead of spaces.

@roryg
Copy link
Owner

roryg commented Sep 14, 2013

I've tried to get ElementHelper to work with MIGX many times but unfortunately have never been able to. To make things a little easier for myself I usually create the migx tvs in the JSON file and also include the Form Tabs and Grid Columns so that I can just copy and paste it from my editor in to the manager. It's also good since I can keep it under version control that way as well.

If you find a way to get it working please let me know!

@JayCarney
Copy link
Contributor Author

Tested the lowercase type declaration on images and it still seems to be ignoring the media source path. ie:
media source is in assets/uploads
image value is /test/img.jpg

image returns a value of /test/img.jpg instead of /assets/uploads/test/img.jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants