I need to add a blog to a site and the owner wants to be able to add multiple images - but not a set number. They want to be able to display them in a grid but choose one hero image - I'm thinking Migx but not sure where to start!
Any tips?
-
☆ A M B ☆
- 24,524 Posts
Thanks.
Yep I've used Migx to bring in image before, no problem - but what I can't get my head round is how to give the user options when they upload their images - for example, they might want the first image they upload to be the hero image at full width across their page, and then the next three images to be smaller versions - I assume it needs a tick box against the images in the grid to be 'hero' or 'thumb' - I can get the checkboxes in there - but not sure how to leverage them!
add a field to the formtabs
{"field":"tpl","caption":"Hero","inputTVtype":"listbox","inputOptionValues":"thumb==tplThumb||hero==tplHero"}
then you can have two different chunks tplHero and tplThumb
call it like that:
[[getImageList?
&tvname=`yourTV`
&tpl=`@FIELD:tpl`
]]
Or, if the first image is the hero-image, you don't need a checkbox or listbox-field.
Call it just:
[[getImageList?
&tvname=`yourTV`
&tplFirst=`tplHero`
&tpl=`tplThumb`
]]
Ah Ok thanks - I will give that a go!
Just not very familiar with the syntax on Migx yet, so wasn't sure how to manipulate!
This is my first (of many) modx sites - I'm v happy wih the results so far, but just a few teething problems that the forum has helped me iron out - thanks all!!
Thanks again!
Andy