We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41958
    • 65 Posts
    Thanks for the both of you. Also for being patient to asnwer my questions.

    Just to make sure if I understand it correctly, it should look like this:
    resource----template---snippet_call(s)---TV's
    ---chunk

    and what I have right now is:
    resource----template---TV's

    So the method I sould use is to make a chunk for the calls and place that chunk in the template? Like mentioned here: http://rtfm.modx.com/display/ADDON/MIGX.Frontend-Usage under Using getResources values in a MIGX call?


      • 41958
      • 65 Posts
      I am lost now to what to put in each:

      resource: this one is ok, this holds the data via the migx TV's
      **********
      template: this would call for the chunk? like [[$getResources-tpl]]
      **********
      TV's: will be called by the chunk??
      **********
      chunk(s): something like this???
      [[!getImageList?
      &tvname=`project_item`
      &tpl=`yourMIGXtpl` <*******what is this one?
      &docid=`[[+id]]`
      &limit=`1`
      &pagetitle=`[[+pagetitle]]`
      ]]

      and something like this? Is this another chunk? named yourMIGXtpl??
      <img src="[[+image]]" alt="[[+property.pagetitle]]" width="589" height="400" />

      [[!getImageList?
      &tvname=`project_item`
      &tpl=`yourMIGXtpl`
      &docid=`[[+id]]`
      &offset=`1`
      &pagetitle=`[[+pagetitle]]`
      ]]

      <a href="[[~[[+property.originalResourceId]]]]">See more images from [[+property.pagetitle]]</a>
      <a href="[[+image]]" class="structural" title="[[+property.pagetitle]]" rel="shadowbox[[[+property.pagetitle]]]" />[[+property.pagetitle]]</a>
      **********
      So in my case do I need 4 chunks? and only 2 of them will be called by the template?

      I am sure once I understand, it will make sence then. [ed. note: openstep last edited this post 13 years, 10 months ago.]
        • 4172
        • 5,888 Posts
        let's say you have some projects as subresources in your portfolio-page
        each project-resource has some MIGX-images.

        Then you would put getResources to your portfolio-page to get the projects:

        <ul>[[getResources? &tpl=`yourProjectTpl` &parents=`[[*id]]` &includeTVs=`1` &includeContent=`1`]]</ul>


        yourProjectTpl is a chunk with name 'yourProjectTpl' , you can name it as you like.

        content of yourProjectTpl something like that:

        <li class="project">
        <h2><a id="[[+pagetitle]]" name="[[+pagetitle]]"></a>[[+pagetitle]]</h2>
        <div class="proj-content">
        <div class="url"><a href="http://[[+project_url]]">[[+project_url]]</a></div><!--end url-->
        <p>[[+content]]</p>					
        <div class="proj-box">
        <div class="slides"> 
        
        <div class="slide-nrs">1 of 1</div>  	         		
        [[getImageList?
        &docid=`[[+id]]` 
        &tvname=`project_item`
        &tpl=`yourProjectImageTpl` 
        &pagetitle=`[[+pagetitle]]`
        ]]
         
        <ul>
          <li>Design</li>		                            
          <li>CSS/(X)HTML</li>
          <li>Programozás</li>
        </ul>
                                        
        </div><!--end slides!-->
        </div><!--end proj-box-->
        </div><!--end project content-->
        </li>
        


        the chunk 'yourProjectImageTpl'

        [[+idx:is=`1`:then=`
        <a rel="shadowbox[[[+property.pagetitle]]]" title="[[+property.pagetitle]]" href="[[+image]]">
        <img width="589" height="400" alt="[[+property.pagetitle]]" src="[[+image]]"></a>
        `:else=`
        <a href="[[+image]]" class="structural" title="[[+property.pagetitle]]" rel="shadowbox[[[+property.pagetitle]]]">[[+property.pagetitle]]</a
        `]]               			
        
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!