We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51867
    • 19 Posts
    Hi

    I am currently trying to create a 'featured artists' section on a site using the ResourceList TV.

    I have created the TV and selected the artist I wish to feature, but I cannot call this information using getResource for some reason. This is my getResource call:

    [[!getResources?
    &parents=`20`
    &id=`[[*FeaturedArtist]]`
    &tpl=`FeaturedArtistTpl`
    ]]

    The parent container for the artists pages has an ID of 20, and the ResourceList TV is called 'FeaturedArtist'.

    The chunk 'FeaturedArtistTpl' currently just has [[*pagetitle]] (which I had hoped would output the band name) but instead of outputting the name of the selected band, it instead shows the page title for the page I am on (currently 'Home'). If I insert [[*FeaturedArtist]] onto the page it outputs the correct ID so I can't work out what is going wrong.

    I have tried adding processTVs and includeTVs to no avail.

    any ideas?

    Andy
      • 4172
      • 5,888 Posts
      to get the pagetitle, you have to use the placeholder
      [[+pagetitle]]


      [[*pagetitle]]
      is the resourcefield-tag for the pagetitle of the current resource.

      to get the filtered resource(s), use the property &resources, like:

      [[!getResources?
      &parents=`20`
      &resources=`[[*FeaturedArtist]]`
      &tpl=`FeaturedArtistTpl`
      ]]

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 51867
        • 19 Posts
        Hi Bruno

        Thanks for the speedy reply!

        I have now managed to output the page title, and the published date (although I do not actually need this, was just testing some stuff out) but I am having difficulty getting anything from TVs that I have created. I have included includeTVs and processTVs in the getResources call on the homepage template but I am getting nothing back.

        I have tried using

        [[*Artist Image]]
        [[*bio]]

        and

        [[+Artist Image]]
        [[+bio]]

        (Artist Image and Bio are my two TV names)

        Andy
          • 3749
          • 24,544 Posts
          Try adding this:

          &tvPrefix=``


          Without it, getResources is looking for TVs named tv.Bio and tv.Artist Image.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting