We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17855
    • 43 Posts
    On a site I’m working on, we have a slideshow area at the top of the page.

    Each slide is made up of images and HTML links (not an image). So that the client can make up slides on the fly we organise things like this:

    - Slide Folder
    - Slide 1
    - Slide icon 1 + text
    - Slide icon 2 + text
    - Slide icon 3 + text
    - Slide icon 4 + text
    - Slide 2
    - Slide icon 1 + text
    - Slide icon 2 + text
    - Slide icon 3 + text
    - Slide icon 4 + text

    Then using GetResources call to make up the slides and their components. At the moment we have a protracted loop of getresources.

    What I would like to do is use one get resources call [[!getResources? &tpl=`slideSyleTpl` & parents=`Slide1`]] on each of the top Slide 1 / Slide 2 (sub-parent folders) and then use a new snippet to get the rendered page content from each of the child folders of ’Slide Folder’.

    I’ve looked though the docs but am unable to work it out. Is there a method to grab the rendered page (content after template applied) of a particular ID?

    I want to do this per page, as we use different templates per slide.

    I may have missed something really simple, as I’m so far in to things...

    Hope this makes sense - thanks all.
      • 26016
      • 561 Posts
      Hi,
      I don’t know if I can help you, but I just use it like Ditto. Maybe I’m doing the opposite of what you’re doing, as I’m just pulling in the content of child documents and templating the result. What you’re doing sounds very advanced and slick, but maybe more resource-intensive?

      I have a root document where I put this call:
      [[getResources? &includeTVs=`1` &includeContent=`1` &tpl=`GetResourcesTest`]]


      Then I just stick child documents under that which contain what I want. They could be thumbnails, slides, products, what-have-you. A user could just be instructed to make child documents under it to add more goodies to the root page display. Note that I’m also pulling in TV content from each page, which is entirely optional, of course. The good thing about a TV is that it could be limited to an image, or some other thing.

      I have that call in page content, but it could be used anywhere in a template, and you can tell it to use whatever parent(s) or documents you want it to aim at by using a couple more parms.

      But I’m guessing that I’ve missed part of your point. smiley
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4