This question has been answered by Bruno17. See the first response.
Hi,
I've been trying various ways to bring a existing gallery from an old flat file site into Modx.
due to the number of images (all having title and descriptions etc) it's not feasible to use the Gallery plugin, as it would take all year to add all the information.
The only thing I can think of is to use a collection, so that each image is it's own resource, and then I can import the data using importX.
Then display them with getResources.
My question is - if there are hundreds of images, will this slow down the site seeing as each image is a resource?
It doesn't seem like a very practical solution, but the only one I can think of!
I have already upload all the images into Modx, and have put each gallery in it's own folder.
Thanks for any help on how people have migrated galleries n the past.
Andy
[
{"caption":"Info", "fields": [
{"field":"title","caption":"Title"}, {"field":"image","caption":"Image","inputTVtype":"image"}
]}
][
{"header": "Title", "width": "160", "sortable": "true", "dataIndex": "title"},
{"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer": "this.renderImage"}
] [[!getImageList?
&tvname=`image_tv`
&tpl=`image_tv_TPL`]]<div class="item"> <img src="[[pthumb? &input=`[[+image]]` &options=`w=180`]]" title="... [[+title]]"> </div>
Quote from: tm2000 at Jan 21, 2016, 03:30 AMHi,
I've been trying various ways to bring a existing gallery from an old flat file site into Modx.
due to the number of images (all having title and descriptions etc) it's not feasible to use the Gallery plugin, as it would take all year to add all the information.
The only thing I can think of is to use a collection, so that each image is it's own resource, and then I can import the data using importX.
Then display them with getResources.
My question is - if there are hundreds of images, will this slow down the site seeing as each image is a resource?
It doesn't seem like a very practical solution, but the only one I can think of!
I have already upload all the images into Modx, and have put each gallery in it's own folder.
Thanks for any help on how people have migrated galleries n the past.
Andy
Hi,
It wont slow down in my experience, if you use "pthumb" which is way faster and lightweight then phpThumbof.
A second great secret, and one of my humble discoveries I could add to the Modx Forum is "xFPC"-caching.
By using this, your site will be lightning fast.
- http://rtfm.modx.com/display/ADDON/xFPC
--> xFPC : download http://modx.com/extras/package/xfpc and upload NON-extracted package to core/packages + klik "lokaal zoeken voor plugins (submenu)"
--> it will cache AUTOMATICALLY, no need to config, in core/cache/xfpc/
Here is some simple code to quickly make a little gallery with migx and pthumb:
-1- MAKE MIGX VAR
output: standard
FORM TABS:
[ {"caption":"Info", "fields": [ {"field":"title","caption":"Title"}, {"field":"image","caption":"Image","inputTVtype":"image"} ]} ]
GRID:
[ {"header": "Title", "width": "160", "sortable": "true", "dataIndex": "title"}, {"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer": "this.renderImage"} ]
-2- Make loop that takes all images and shows them in a TPL
[[!getImageList? &tvname=`image_tv` &tpl=`image_tv_TPL`]]
-3- define the TPL for getimagelist
<div class="item"> <img src="[[pthumb? &input=`[[+image]]` &options=`w=180`]]" title="... [[+title]]"> </div>
Not a big friend of 'resources for everything' here.
CSV-import is supported since 2.9.7
https://github.com/Bruno17/MIGX/commit/87611f6f66ecd18d3e560a670f689d95820ac0be
but not sure, if I would use a MIGX-TV, but MIGXdb, if there are many, maybe searchable images for each Resource.
not true.
you will get the file-browser, where you can select a CSV-file.
within the MIGX-configurator-CMP you can add the action-button for importing CSV to MIGX
Then you will have a new button above the MIGX-grid.
When you click that button, you will get a Textarea, where you can put your CSV-Data for importing.