New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • Hi dear modx community.
    Several days i am cannot resolve an issue with migx.

    I wanna create a slider.
    I have created the migx tab with fields below.
    Therefore have creared tv variable that called slider-image.

    At the backend page i can see added images.
    But at frontend page everything (title, description etc) renders, except image.
    In the code editor, fields of images look <img src(unknown)>
    But, if i am removing
    &docid=`[[+id]]`
    from getImageList then i am seeing:

    <img src="[{" migx_id":"3","title":"Слайд="" 1","slide":"feedback_form.png","description":"АААААААААААААААААААААААААААААААААААААААА","page_id":"2"},{"migx_id":"4","title":"Слайд="" 2","slide":"bg_contacts.png","description":"ББББББББББББББББББББББББББББББББББ","page_id":"3"},{"migx_id":"5","title":"Слайд="" 4","slide":"logo.png","description":"ВВВВВВВВВВВВВВВВВВВВВВВВВВВВВВВ","page_id":"5"}]"="" alt="Слайд 4">
    

    Can't understand what the root cause of this issue.
    Need help.

    Output code is
    [[!getImageList? 
       &tvname=`slider-image`
       &tpl=`-tmpl-slider-item`
       &docid=`[[+id]]`
    ]]

    Chunk's code
    <div class="item [[+idx:is=`1`:then=`active`]]">
      <img src="[[+slider-image]]" alt="[[+title]]">
      <div class="carousel-caption">
        <h3>[[+title]]</h3>
        <p>[[+description]]</p>
      </div>
    </div>


    {
      "formtabs":[
        {
          "MIGX_id":1,
          "caption":"BSCarousel",
          "print_before_tabs":"0",
          "fields":[
            {
              "MIGX_id":1,
              "field":"title",
              "caption":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
              "description":"",
              "description_is_code":"0",
              "inputTV":"",
              "inputTVtype":"",
              "validation":"",
              "configs":"",
              "restrictive_condition":"",
              "display":"",
              "sourceFrom":"config",
              "sources":"",
              "inputOptionValues":"",
              "default":"",
              "useDefaultIfEmpty":"0",
              "pos":1
            },
            {
              "MIGX_id":2,
              "field":"slide",
              "caption":"\u0421\u043b\u0430\u0439\u0434",
              "description":"",
              "description_is_code":"0",
              "inputTV":"slider-image",
              "inputTVtype":"image",
              "validation":"",
              "configs":"",
              "restrictive_condition":"",
              "display":"",
              "sourceFrom":"migx",
              "sources":"",
              "inputOptionValues":"",
              "default":"",
              "useDefaultIfEmpty":"0",
              "pos":2
            },
            {
              "MIGX_id":3,
              "field":"description",
              "caption":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",
              "description":"",
              "description_is_code":"0",
              "inputTV":"",
              "inputTVtype":"",
              "validation":"",
              "configs":"",
              "restrictive_condition":"",
              "display":"",
              "sourceFrom":"config",
              "sources":"",
              "inputOptionValues":"",
              "default":"",
              "useDefaultIfEmpty":"0",
              "pos":3
            },
            {
              "MIGX_id":4,
              "field":"page_id",
              "caption":"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 id \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f",
              "description":"",
              "description_is_code":"0",
              "inputTV":"",
              "inputTVtype":"",
              "validation":"",
              "configs":"",
              "restrictive_condition":"",
              "display":"",
              "sourceFrom":"config",
              "sources":"",
              "inputOptionValues":"",
              "default":"",
              "useDefaultIfEmpty":"0",
              "pos":4
            }
          ],
          "pos":1
        }
      ],
      "contextmenus":"",
      "actionbuttons":"",
      "columnbuttons":"",
      "filters":"",
      "extended":{
        "migx_add":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0430\u0439\u0434\u044b",
        "disable_add_item":"",
        "add_items_directly":"",
        "formcaption":"",
        "update_win_title":"",
        "win_id":"",
        "maxRecords":"",
        "addNewItemAt":"bottom",
        "media_source_id":4,
        "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":""
      },
      "columns":[
        {
          "MIGX_id":1,
          "header":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
          "dataIndex":"title",
          "width":"",
          "sortable":"false",
          "show_in_grid":1,
          "customrenderer":"",
          "renderer":"",
          "clickaction":"",
          "selectorconfig":"",
          "renderchunktpl":"",
          "renderoptions":"",
          "editor":""
        },
        {
          "MIGX_id":2,
          "header":"\u0421\u043b\u0430\u0439\u0434",
          "dataIndex":"slide",
          "width":"",
          "sortable":"false",
          "show_in_grid":1,
          "customrenderer":"",
          "renderer":"this.renderImage",
          "clickaction":"",
          "selectorconfig":"",
          "renderchunktpl":"",
          "renderoptions":"",
          "editor":""
        },
        {
          "MIGX_id":3,
          "header":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",
          "dataIndex":"description",
          "width":"",
          "sortable":"false",
          "show_in_grid":1,
          "customrenderer":"",
          "renderer":"",
          "clickaction":"",
          "selectorconfig":"",
          "renderchunktpl":"",
          "renderoptions":"",
          "editor":""
        },
        {
          "MIGX_id":4,
          "header":"id \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",
          "dataIndex":"page_id",
          "width":"",
          "sortable":"false",
          "show_in_grid":1,
          "customrenderer":"",
          "renderer":"",
          "clickaction":"",
          "selectorconfig":"",
          "renderchunktpl":"",
          "renderoptions":"",
          "editor":""
        }
      ],
      "category":""
    }
    
    [ed. note: cere6ellum last edited this post 1 month, 2 weeks ago.]
    • Hi,
      How is about this?
      <div class="item [[+idx:is=`1`:then=`active`]]">
        <img src="[[+slide]]" alt="[[+title]]">
        <div class="carousel-caption">
          <h3>[[+title]]</h3>
          <p>[[+description]]</p>
        </div>
      </div>
        Anton Tarasov
        MODX Developer

        Email: contact@antontarasov.com
        Web: antontarasov.com
      • Quote from: himurovi4 at Feb 04, 2019, 07:37 AM
        Hi,
        How is about this?
        <div class="item [[+idx:is=`1`:then=`active`]]">
          <img src="[[+slide]]" alt="[[+title]]">
          <div class="carousel-caption">
            <h3>[[+title]]</h3>
            <p>[[+description]]</p>
          </div>
        </div>
        Everything is well here.
        Problem was formed, because i saw the tv of migx wrongly.
        In this block
        "inputTV":"slider-image"

        should write tv name that has "image" input type property.
        And then it works fine.
        My mistake.
        • Quote from: cere6ellum at Feb 04, 2019, 08:43 AM
          Quote from: himurovi4 at Feb 04, 2019, 07:37 AM
          Hi,
          Problem was formed, because i saw the tv of migx wrongly.
          In this block
          "inputTV":"slider-image"

          should write tv name that has "image" input type property.
          And then it works fine.
          My mistake.

          Good catch and good luck! smiley
            Anton Tarasov
            MODX Developer

            Email: contact@antontarasov.com
            Web: antontarasov.com