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

Using ImagePlus with Migx #2

Closed
pmacswebteam opened this issue Jun 3, 2015 · 1 comment
Closed

Using ImagePlus with Migx #2

pmacswebteam opened this issue Jun 3, 2015 · 1 comment
Labels

Comments

@pmacswebteam
Copy link

Can I use ImagePlus in MigX?

I have a MigX form grid that has an image. I want that image to be constrained to a certain width and height. How can I use ImagePlus to do this?

Form Tabs:

[
{"caption":"Members", "fields": [
 {"field":"header","caption":"Header","description":"Enter the name of the section header ONLY IF this is the first person in a new section (ex. Faculty)."},
 {"field":"name","caption":"Name"},
 {"field":"position","caption":"Position","description":"This information is optional."},
 {"field":"email","caption":"Email","description":"This information is optional."},  
 {"field":"number","caption":"Phone Number","description":"This information is optional."}, {"field":"description","caption":"Description","description":"This information is optional.","inputTVtype":"richtext"},
{"field":"image","caption":"Image","inputTVtype":"imageplus"}
]}
]

Grid Columns:

[
{"header": "Header", "width": "50", "sortable": "true", "dataIndex": "header"},
{"header": "Name", "width": "70", "sortable": "true", "dataIndex": "name"},
{"header": "Position", "width": "50", "sortable": "true", "dataIndex": "position"},
{"header": "Email", "width": "50", "sortable": "true", "dataIndex": "email"},
{"header": "Phone Number", "width": "50", "sortable": "true", "dataIndex": "number"},
{"header": "Description", "width": "50", "sortable": "false", "dataIndex": "description"},
{"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer": "this.renderImage"}
]

This is the error I am getting when trying to open the MigX Grid in resources

Fatal error: Call to a member function getProperties() on a non-object in /home/cms/modx-cores/pkg-test/components/imageplus/elements/tv/input/imageplus.class.php on line 100

Thank you!

@Jako
Copy link
Owner

Jako commented Jun 5, 2015

You have to set a media source in migx to avoid that bug. The bug is solved with the next version.

You can't use this.renderImage to display the Image in the grid column. You have to use the renderer of the Image+ package ("renderer": "ImagePlus.MIGX_Renderer").

@Jako Jako closed this as completed Jun 5, 2015
@Jako Jako added the bug label Jun 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants