Ok, here we go:
please go to the migx cmp: /manager/?a=index&namespace=migx&configs=migxconfigs
then klik on add item and enter the name: SpaBreaks and hit save
then right click on that config and klick: Export/Import
then past this code in there, replacing whats in there:
{
"formtabs":[
{
"MIGX_id":12,
"caption":"Info",
"print_before_tabs":"0",
"fields":[
{
"field":"title",
"caption":"Title",
"pos":1,
"MIGX_id":50
},
{
"field":"type",
"caption":"Type",
"pos":2,
"MIGX_id":51
},
{
"field":"description",
"caption":"Description",
"inputTVtype":"richtext",
"pos":3,
"MIGX_id":52
},
{
"field":"tag1day",
"caption":"Tag 1 Days",
"pos":4,
"MIGX_id":53
},
{
"field":"tag1price",
"caption":"Tag 1 Price",
"pos":5,
"MIGX_id":54
},
{
"field":"tag2day",
"caption":"Tag 2 Days",
"pos":6,
"MIGX_id":55
},
{
"field":"tag2price",
"caption":"Tag 2 Price",
"pos":7,
"MIGX_id":56
},
{
"MIGX_id":57,
"field":"icons",
"caption":"Icons",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"migx",
"validation":"",
"configs":"icon_migx",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":8
}
],
"pos":1
},
{
"caption":"Image",
"fields":[
{
"field":"image",
"caption":"Image",
"inputTVtype":"image",
"pos":1,
"MIGX_id":58
}
],
"pos":2,
"MIGX_id":13
}
],
"contextmenus":"",
"actionbuttons":"",
"columnbuttons":"",
"filters":"",
"extended":{
"migx_add":"",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"",
"update_win_title":"",
"win_id":"",
"maxRecords":"",
"addNewItemAt":"bottom",
"media_source_id":"",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"",
"extrahandlers":"",
"filtersperrow":4,
"packageName":"",
"classname":"",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":1,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"",
"has_jointable":"yes",
"getlistwhere":"",
"joins":"",
"hooksnippets":"",
"cmpmaincaption":"",
"cmptabcaption":"",
"cmptabdescription":"",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"permissions":{
"apiaccess":"",
"view":"",
"list":"",
"save":"",
"create":"",
"remove":"",
"delete":"",
"publish":"",
"unpublish":"",
"viewdeleted":"",
"viewunpublished":""
},
"fieldpermissions":"",
"columns":[
{
"MIGX_id":1,
"header":"Content",
"dataIndex":"description",
"width":160,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"header":"Image",
"width":50,
"sortable":"false",
"dataIndex":"image",
"renderer":"this.renderImage",
"MIGX_id":2
}
],
"category":""
}
hit save and close
create another config with the name: icon_migx
save and close
then right click on that config and klick: Export/Import
then past this code in there, replacing whats in there:
{
"formtabs":[
{
"caption":"Info",
"fields":[
{
"field":"title",
"caption":"Title",
"pos":1,
"MIGX_id":59
},
{
"field":"icon",
"caption":"Icon",
"inputTVtype":"image",
"pos":2,
"MIGX_id":60
}
],
"pos":1,
"MIGX_id":14
}
],
"contextmenus":"",
"actionbuttons":"",
"columnbuttons":"",
"filters":"",
"extended":{
"migx_add":"",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"",
"update_win_title":"",
"win_id":"",
"maxRecords":"",
"addNewItemAt":"bottom",
"media_source_id":"",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"",
"extrahandlers":"",
"filtersperrow":4,
"packageName":"",
"classname":"",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":1,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"",
"has_jointable":"yes",
"getlistwhere":"",
"joins":"",
"hooksnippets":"",
"cmpmaincaption":"",
"cmptabcaption":"",
"cmptabdescription":"",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"permissions":{
"apiaccess":"",
"view":"",
"list":"",
"save":"",
"create":"",
"remove":"",
"delete":"",
"publish":"",
"unpublish":"",
"viewdeleted":"",
"viewunpublished":""
},
"fieldpermissions":"",
"columns":[
{
"header":"Title",
"width":160,
"sortable":true,
"dataIndex":"title"
}
],
"category":""
}
save and close.
in your tv SpaBreaks1, remove all columns and formtabs and put SpaBreaks in configs field and save:
then in your page / template where you like to show your lists paste this:
[[getImageList? &tvname=`SpaBreaks1` &tpl=`spadaypackages`]]
then in your chunk: spadaypackages
<h4>[[+title]]</h4>
<img src="/[[+image]]" width="200"/><br />
<p>[[+description]]</p>
<p>Iconlist:</p>
<ul>
[[getImageList?
&value=`[[+icons]]`
&tpl=`iconlist`
]]
</ul>
<hr/>
You will have this result in your resource:
and in de front end (unstyled in my case):
You should realy try using the cmp, it will give you a lot of freedom.
Hope this helps
ps this is the iconlist chunk:
<li><img src="/static/default/files/[[+icon]]" width="100" /><strong>[[+title]]</strong></li>
i needed this in my test so it would get the proper path,/static/default/files/