-
- 24,544 Posts
The &parents value is passed on to getResources, so you can look at it's documentation. Basically it tells getResources where to start looking for resources to aggregate. The value is the resource ID to look under. Setting it to 0 starts at the top of the Resource Tree. The &tpl property is also for getResources and is for displaying information about each resource found.
5 is the default limit for getResources. You can change it with the &limit property (0 for unlimited). Get resources is getting the first five resources under the 'web' folder in the tree (since you specified 0 for the parents field). Since you don't have any placeholders in the &tpl value, you're not seeing any information about the five resources it's getting.
Try changing the tpl line to this:
&tpl=`@INLINE <p>Some info: [[+pagetitle]]</p>`
-
- 86 Posts
Thank you very much, Bob! Seems now I understand the way this snippet works, much better. Before it I could not realize that the parameter &parents refers to the snippet getResources. Though the parameter &useWeblinkUrl (I found it in on of examples) is still mysterious to me.
-
- 24,544 Posts
As I understand it, the point of AjaxSnippet is to have a snippet that runs when you click on a button, rather than when the page loads. It will run any snippet and I'm fairly sure it will pass any properties that are not its own on to the snippet. I'm afraid I don't even have a guess about the &useWeblinkUrl property.
That one determines whether to use the URL to a weblink, or to use the URL that the weblink contains.