Obviously, if you want to use getResources, you would have to put each image or link on its own resource. Wouldn't that be unmanageable? Why can't your client not use a rich text editor to create a list of links in the content area of the resource? For the gallery, if the number of images is not too big, why not create TVs for the images and corresponding TVs for their captions all on the same resource?
Hi, I am loving Modx Revo! Thanks for your help! I managed to get it work using MIGX and it turns out to be simple following the doc tutorials. Tks.
First I need to say MIGX is a great addon. I think you Bruno17 are the developer? (Because of the github repo username). Great work!
The "links" section was smooth! With the gallery I've had a little more work. Just one issue remaing, when adding imagens to the resource, nothing is showing in the grid view. In the screenshot I added you could see two lines in the table. That lines are working, but nothing is showing. Any Ideas?
For the form tabs I used:
[{
"caption":"Galeria",
"fields": [{
"field":"titulo",
"caption":"Titulo"
},{
"field":"descricao",
"caption":"Descricao"
},{
"field":"image",
"caption":"Image",
"inputTV":"imageTV"
}]
}]
And for the Grid:
[
{"header": "Titulo", "width": "100", "sortable": "false", "dataindex": "titulo"},
{"header": "Descricao", "width": "160", "sortable": "false", "dataindex": "descricao"},
{"header": "Image", "width": "50", "sortable": "false", "dataindex": "image"}
]
Tks in advance. And sorry for my english.
you should see the values for titulo and descricao in the grid. Can't say why they are empty.
If you want to see the image in the grid you need to use the renderimage-renderer for that column:
[
{"header": "Titulo", "width": "100", "sortable": "false", "dataindex": "titulo"},
{"header": "Descricao", "width": "160", "sortable": "false", "dataindex": "descricao"},
{"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer": "this.renderImage"}
]