We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33238
    • 388 Posts
    Hello, I have a MigX, It has two fields: id, number.

    [[getImageList?
    	&tvname=`MigX`
    	&tpl=`migx.tpl`
    ]]


    inside the tpl there is a pdoResources:

    migx.tpl:
                [[!pdoResources? 
            		&parents=`[[+id]]`
            		&tpl=`content.tpl`
            		&depth=`0`
            		&sortdir=`ASC`
            	]]


    So if I fill the field id, it will display a list of children of that ID, simple; But I need include the other parameter (number) inside the pdoResources (content.tpl) results, for example:

    content.tpl:
    <div class="
        [[+number=`1`:then=`one`]]
        [[+number=`2`:then=`two`]]
    ">
    <h2>[[+pagetitle]]</h2>
    <p>[[+description]]</p>
    </div>


    How can I "inject" the number from MigX into the [[!pdoResources result?

    hope is clear enough.

    Thank you very much!!!

    This question has been answered by Ysanmiguel. See the first response.

      --
      ysanmiguel.com
      • 52064
      • 120 Posts
      add property to pdoResource
      [[!pdoResources? 
          &parents=`[[+id]]`
          &tpl=`content.tpl`
          &depth=`0`
          &sortdir=`ASC`
          &number=`[[+number]]`
      ]]
      
        FerX - Developer at Eracom s.r.l.
      • discuss.answer
        • 33238
        • 388 Posts
        Quote from: ferx77 at Apr 28, 2017, 12:27 PM
        add property to pdoResource
        [[!pdoResources? 
            &parents=`[[+id]]`
            &tpl=`content.tpl`
            &depth=`0`
            &sortdir=`ASC`
            &number=`[[+number]]`
        ]]
        

        No way, can't be that easy... it works laugh
        Thank you very much mate.
          --
          ysanmiguel.com