I'm currently trying to make a gallery with a simple nested migx TV. My template contains a simple gallery (array of images) + slightly more advanced galleries (array of headings and arrays with images). The TV the gallery is using is also used by the adv. gallery.
By changing the nested inputTV Tab setting ("inputTV":"mg.gallery" => "inputTV":"smthelse") it displays the right gallery.
------------------------------------------------------------------------------------------------
Example:
mg.gallery
- g_image: "teaser01.jpg"
- g_image: "teaser02.jpg"
- g_image: "teaser03.jpg"
mg.gallery_showroom
- gs_heading: "unnecessaryheading"
- gs_galleryslides (mg.gallery):
- g_image: "slide01.jpg"
- g_image: "slide02.jpg"
- g_image: "slide03.jpg"
- g_image: "slide04.jpg"
Outputs:
<ul>
<li>teaser01.jpg</li>
<li>teaser02.jpg</li>
<li>teaser03.jpg</li>
</ul>
teaser01.jpg<br>
teaser02.jpg<br>
teaser03.jpg<br>
Expected output:
<ul>
<li>teaser01.jpg</li>
<li>teaser02.jpg</li>
<li>teaser03.jpg</li>
</ul>
slide01.jpg<br>
slide02.jpg<br>
slide03.jpg<br>
slide04.jpg<br>
------------------------------------------------------------------------------------------------
Necessary Code:
TV: mg.gallery
[
{"caption":"Gallery","fields": [
{"field":"g_image","caption":"Picture","inputTVtype":"image"}
]}
]
TV: mg.gallery_showroom
[
{"caption":"Showroom","fields": [
{"field":"gs_heading","caption":"heading"},
{"field":"gs_galleryslides","caption":"Gallery Slider","inputTV":"mg.gallery"}
]}
]
showroom.html
<ul>
[[getImageList? &tvname=`mg.gallery` &tpl=`@FILE:assets/templates/chunks/mg.gallery.html`]]
</ul>
[[getImageList? &tvname=`mg.gallery_showroom` &tpl=`@FILE:assets/templates/chunks/mg.gallery_showroom.html`]]
mg.gallery.html
mg.gallery_showroom.html
[[getImageList? &value=`[[+gs_galleryslides]]` &tpl=`@CODE:[[+g_image]]<br>`]]
------------------------------------------------------------------------------------------------
Offtopic:
Apparently "inputTVtype":"richtext" diplays a table instead of the default textarea if no richtext-editor is installed, "inputTVtype":"textarea" works as expected. Is this normal behavior?
[ed. note: alex.gr last edited this post 10 years, 8 months ago.]