0

I have a resource called 'My Projects' with the following getResources syntax:

[[!getResources? &parents=`5`  &tpl=`protmp` ]]

The chunk, 'protmp', I am using as a template is simple:

<div class="indivproj">
[[*pagetitle]]
</div>

Resource ID 5 has just two child resources under it. With the code above I would expect it to display their names.

Yet when I view the 'My Projects' resource I just get the title of the parent resources repeated 4 times, eg:

My Projects
My Projects
My Projects
My Projects

Does anyone know what I am doing wrong?

MeltingDog
  • 14,310
  • 43
  • 165
  • 295

2 Answers2

3

in your chunk the [[*pagetitle]] should be [[+pagetitle]] also if you are still not getting results, omit the &tpl attribute from the getResources call and IF it is returning anything, it will dump the results directly to the page.

Sean Kimball
  • 4,506
  • 9
  • 42
  • 73
  • Thanks, adding the + did help, but oddly the parent isnt working. It displays all the titles of all published resources – MeltingDog Nov 07 '12 at 09:32
0

Got it: It seems to be a mixture of Seans answer and the fact the I wrote the line in with Text Editor on. I toggled it off and changed [[*pagetitle]] to [[+pagetitle]] and it works ok. Its odd because I thought this didnt matter....

MeltingDog
  • 14,310
  • 43
  • 165
  • 295