We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44665
    • 60 Posts
    sebastian-marinescu Reply #11, 12 years, 1 month ago
    Quote from: Bruno17 at Oct 15, 2014, 09:01 AM
    This should work, too, but you would need to know the json-syntax exactly.
    You can get the syntax, by exporting the generated json or by 'edit raw' to get the formtabs and columns as editable json-string

    Hi again,
    I actually did for the corresponding column, but it's still not working.

    In the MIGx-TV I have the following configuration:

    Formtabs

    [{
    		"caption": "Neuer Teaser", 
    		"fields": [
    			{
    				"field": "teaserPoolRID",
    				"caption": "Teaser-Ressource",
    				"inputTV": "teaserResourceList"
    			},
    			{
    				"field": "teaserPoolSize",
    				"caption": "Teaser-Größe",
    				"inputTV": "teaserSize"
    			}
    		]
    }]


    Columns

    [
    	{
    		"header": "ID",
    		"sortable": "true",
    		"dataIndex": "teaserPoolRID",
    		"width": "25"
    	},
    	{
    		"header": "Name",
    		"sortable": "true",
    		"dataIndex": "teaserPoolTest",
    		"show_in_grid": 1,
    		"renderer": "this.renderChunk",
    		"renderchunktpl": "xxx"
    	},
    	{
    		"header": "Größe",
    		"sortable": "true",
    		"dataIndex": "teaserPoolSize",
    		"width": "25"
    	}
    ]


    Shouldn't the column "Name" now at least render "xxx" in every row?
      • 4172
      • 5,888 Posts
      You're right. Seems it is only working, configured with the MIGX-configurator.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 44665
        • 60 Posts
        sebastian-marinescu Reply #13, 12 years, 1 month ago
        Okay, now I can settle down and use the Configurator smiley

        Thank you very much Bruno for participating in my journey (and thank you very much for developing MIGX!)
          • 47243
          • 30 Posts
          Hi,
          went into same issue, changing the name as you said worked.
          But there seems to be a problem when I use multiple-select.

          If I select only one element in the dropdown, it renders correctly according to my chunk.
          But If I select more than 1, it doesn't render.

          I checked without rendering and my grid shows me my 2 selections that it automaticcaly separate with a comma ( for instance "232,234" ).
          Then I tried to render by changing the name and select "this.renderChunk" and by putting in my rendering chunk template : [[+myFieldname]] but it shows me nothing because it contains more than one selected element.

          The one where I selected only one element renders correctly.

          why is that?
            • 4172
            • 5,888 Posts
            replace the fastField - tag with:

            [[migxLoopCollection? 
            &classname=`modResource`
            &where=`{"id:IN":"[ [[+yourFieldname]] ]"}`
            &tpl=`@CODE:[[+pagetitle]]<br />`
            ]]
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 47243
              • 30 Posts
              seems to work (without the quote between [ [[+yourFieldname]] ]) but it only recognize the comma delimiter, or in the database selected items are stored with pipeline ||.
              I went into the migxLoopCollection but couldn't find a parameter like &delimiter .

              So I used the replace=`||==,` filter but I then remember that anyway if more than 2 items are selected and save to database like this "232||234", it doesn't work

              if I ask migx to display it's content like this [[+myFieldname]] it won't even show me "232||234"

              To make it clearer :
              if [[+myFieldname]] contains in db "232" , in backeend grid when using a chunk template containing just [[+myFieldname]], it will display 232
              if [[+myFieldname]] contains in db "232||234" , in backeend grid when using a chunk template containing just [[+myFieldname]], it will display nothing : shouldn't it display the raw content like that "232||234" ?
              [ed. note: robotpapier last edited this post 12 years ago.]
                • 4172
                • 5,888 Posts
                [[+myFieldname]]

                in your MIGX - tpl definitly should display
                232||234


                if it is in the db like that.

                Also the replace outputfilter should work then, but maybe you will need to put it into a chunk instead of the inline @CODE: - binding

                &tpl=`yourChunk`


                the chunk:

                [[+pagetitle:replace=`||==,`]]<br />




                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 47243
                  • 30 Posts
                  I put it in a chunk already.
                  The chunk contains only
                  [[+myFieldname]]

                  just to check its content.

                  the chunk works in the front end but it doens't work if trying to render inside the grid with this.renderChunk
                  I mean it only display the content of the field if only one item is selected in the listbox-multiple dropdown.

                  If I edit the entry, the selected items of the dropdown are ok, so it is saved.
                  I checked again in database and it is saved too this way ..... "myFieldName":["232","234"] ......

                  I'll check again if I haven't forgotten anything but it's weird that it returns the value of my field only if there have been one item selected...
                    • 47243
                    • 30 Posts
                    Oh! i've just tried something.

                    I edited my database directly and changed "myFieldName":["232","234"] with "myFieldName":"232||234"
                    And it works, both pagetitle refering to those ids are returned in the grid.

                    So it seems that my listbox-multiple doesn't save with the right format, is that normal or can you tell migx to save listbox-multiple with pipeline separator?
                      • 47243
                      • 30 Posts
                      Maybe i should mention that my input option values are retrieved with

                      @SELECT pagetitle, id FROM modx_site_content WHERE parent=231 AND published=1


                      the rest of options in migx configurator are default.