[[~[[+yourField]]]]
[[!getImageList? &tvname=`Images` &tpl=`yaml_imagebox` &toSeparatePlaceholders=`MYIMG`]]
[
{"header": "Variable", "width": "10", "sortable": "true", "dataIndex": "itemid", "dataValue":"[[+MYIMG.{idx}]]"},
{"header": "Desc.", "width": "10", "sortable": "true", "dataIndex": "description","renderer":"this.renderLimited"},
{"header": "Title", "width": "160", "sortable": "true", "dataIndex": "title"},
{"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer":"this.renderImage"},
{"header": "Pos.", "width": "10", "sortable": "true", "dataIndex": "position"}
]
&placeholdersKeyField=`number`
[[+MYIMG.1]],[[+MYIMG.2]],[[+MYIMG.3]]
Is anyone else having trouble using MIGX with Image TVs in 2.1.2 and 2.1.3? Actually I can’t get it to render a preview for anything. and Image TVs no longer recognizes a context’s filemanager_path or filemanager_url. They default to the main context’s filemanager_path no matter what I do.
Quote from: abelafonte at Jul 25, 2011, 06:35 PM
Is anyone else having trouble using MIGX with Image TVs in 2.1.2 and 2.1.3? Actually I can’t get it to render a preview for anything. and Image TVs no longer recognizes a context’s filemanager_path or filemanager_url. They default to the main context’s filemanager_path no matter what I do.
doesn’t this patch help to solve that issue?
http://modxcms.com/forums/index.php/topic,63702.msg377100.html#msg377100
that doesn’t create a number dynamically (perhaps a custom-tv could be created which can do it)
but you can add a field where you add a manual number and you can use this field in the placeholder with:
&placeholdersKeyField=`number`
now the number in the placeholder will be the value of your ’number’-field
[[+MYIMG.1]],[[+MYIMG.2]],[[+MYIMG.3]]
.....and thanks for your patch. I will add it to the next version of MIGX.
[
{
"caption":"Add Image",
"fields": [
{"field":"variable","caption":"Variable No.","inputTV":"Images_tv-variable"},
{"field":"description","caption":"Desc.","inputTV":"Images_tv-description"},
{"field":"title","caption":"Title","inputTV":"Images_tv-title"},
{"field":"image","caption":"Image","inputTV":"Images_tv-image","renderer": "this.renderImage"},
{"field":"position","caption":"Position","inputTV":"Images_tv-position"},
{"field":"width","caption":"Width","inputTV":"Images_tv-width"},
{"field":"height","caption":"Height","inputTV":"Images_tv-height"}
]
}
]
[
{"header": "No.", "width": "10", "sortable": "true", "dataIndex": "variable"},
{"header": "Desc.", "width": "10", "sortable": "true", "dataIndex": "description"},
{"header": "Title", "width": "160", "sortable": "true", "dataIndex": "title"},
{"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer":"this.renderImage"},
{"header": "Pos.", "width": "10", "sortable": "true", "dataIndex": "position"}
]
@EVAL return '[[+MYIMG.'. $_REQUEST['itemid'] .']]';
[[!getImageList? &tvname=`Images` &tpl=`yaml_imagebox` &toSeparatePlaceholders=`MYIMG` &docid=`[[*id]]` &placeholdersKeyField=`variable`]]
[
{"caption":"Text", "fields": [
{"field":"textabsatz","caption":"Textabsatz","inputTV":"tvMigxRichText"}
]},
{"caption":"Bild", "fields":[
{"field":"bildauswahl","caption":"Bildauswahl","inputTV":"tvMigxBildauswahl"},
{"field":"bildzeile","caption":"Bildunterschrift","inputTV":"tvMigxRichtext"},
{"field":"bildausrichtung","caption":"Bildausrichtung","inputTV":"tvMigxBildausrichtung"},
{"field":"bilddownload","caption":"Bilddownload","inputTV":"tvMigxBilddownload"},
{"field":"lupe","caption":"Bildlupe","inputTV":"tvMigxLupe"}
]},
{"caption":"PDF", "fields": [
{"field":"pdfauswahl","caption":"PDF-Datei","inputTV":"tvMigxDateiauswahlPdf"},
{"field":"pdflinktext","caption":"Linktext"},
{"field":"pdfbeschreibung","caption":"Beschreibung","inputTV":"tvMigxTextarea"}
]},
{"caption":"Quellcode", "fields": [
{"field":"quellcode","caption":"Quellcode-Eingabe"}
]}
][
{"header": "Text", "width": "160", "sortable": "true", "dataIndex": "textabsatz"},
{"header": "Bild", "width": "50", "sortable": "false", "dataIndex": "bildauswahl","renderer": "this.renderImage"},
{"header": "PDF", "width": "20", "sortable": "true", "dataIndex": "pdflinktext"},
{"header": "Quellcode", "width": "20", "sortable": "true", "dataIndex": "quellcode"}
]This discussion is closed to further replies. Keep calm and carry on.