New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • columnbuttons can only be defined with a MIGX - configuration.

    To get a working syntax for renderers, you could try to create the columns with the configurator and copy/paste the generated formtabs-json, while opening the config-modal with 'edit raw'
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
    • Hi Bruno,

      in the chunk I am calling a snippet:
      [[getmigxurl? &val=`[[+links]]`]]


      the snippet code:

      <?php
      $val = $modx->getOption('val', $scriptProperties, "");
      /* //the following json is the field content if I do not use a renderer.
      $val = '[{"MIGX_id":"1","url":"asdasd","country":"all","afid":"Standard","releasetitle":"","cnames_ro":"","_this.value":"Standard","cnames":"Überall/Fallback","afidrendered_ro":"","afidrendered":"Standard"},{"MIGX_id":"2","url":"asdasd","country":"DE","afid":"Standard","releasetitle":"","cnames_ro":"","_this.value":"Standard","cnames":"Deutschland","afidrendered_ro":"","afidrendered":"Standard"},{"MIGX_id":"3","url":"asdasda","country":"DE-AT-CH","afid":"Standard","releasetitle":"","cnames_ro":"","_this.value":"","cnames":"GSA","afidrendered_ro":"","afidrendered":"Standard"}]';
      */
      
      
      
      $array = json_decode($val, true);
      if(!isset($array)) return;
      
      $size=0;
      $skey = "url";
      $svalue = "Kein Link gefunden.";
      
      $size = count(array_filter($array, function($element){
          return $element['url'] != 'Kein Link gefunden.';
      }));
      
      $size = $size-1;
      
      $outputtxt = '+ weitere '.$size.' Links';
      
      echo $outputtxt;
      


      The following json is the field content in the manager if I do use the renderer:

      + weitere 2 Links+ weitere 2 Links+ weitere 2 Links
      • Quote from: balihoo at Aug 25, 2017, 03:11 PM
        Hi Bruno,

        in the chunk I am calling a snippet:
        [[getmigxurl? &val=`[[+links]]`]]



        in which chunk?
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
        • Quote from: Bruno17 at Aug 25, 2017, 03:41 PM
          Quote from: balihoo at Aug 25, 2017, 03:11 PM
          Hi Bruno,

          in the chunk I am calling a snippet:
          [[getmigxurl? &val=`[[+links]]`]]



          in which chunk?

          ahhhh... now I got it. I had to place my snippet call directly in the renderchunktpl field. For some reason I thought I have to use the getimglist snippet there and call my snippet in the tpl chunk. Now everythings works perfectly fine!
          • yeah, otherwise you get an output for each item
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!