We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36613
    • 328 Posts
    I create a list of annunce. I Want see in the font end the detail of annunce i do this:
    [[!bloX? &packagename=`annunci2` &limit=`0` &classname=`annunci2` &tpls=`bloxouter:outerTpl||row:rowTpl` &debug=`0`]] 


    rowTpl is:
    <li class="clearfix">
    <a href="[[~53]]?id=[[+id]]">[[+titolo]] </a>
    <div class="description">[[+description]]</div>
    </li> 


    I put a href in the page that should make to see the details. How do I get to see on a page in the various fields of the row migx?
      • 4172
      • 5,888 Posts
      I think, using id as a query-param isn't a good idea.
      I would use something like:

      <li class="clearfix">
      <a href="[[~53? &annunci_id=`[[+id]]`]]">[[+titolo]] </a>
      <div class="description">[[+description]]</div>
      </li>


      then on your landing-page:

      [[!migxLoopCollection?
      &packageName=`annunci2`
      &classname=`annunci2`
      &tpl=`detailTpl`
      &where=`{"id":"[[!GET? &name=`annunci_id`]]"}`
      ]]


      the GET - snippet:

      $name = $modx->getOption('name',$scriptProperties,'object_id');
      return $_GET[$name];
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 36613
        • 328 Posts
        Thanks you Bruno, you think i can have the landing-page with "Speaking URL with path segment", in the landing-page ?
          • 4172
          • 5,888 Posts
          this is possible with a plugin, which listens to the system-event OnPageNotFound
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!