I'm setting up a modx site using 2.1.3-pl.
I'm following the examples in the official documentation for setting up a blog. I've got most everything working.
I have installed the getResources snippet.
In the 'Adding a "Latest Posts" widget', there is an example getResources call. I modified it slightly to this:
[[!getResources?
&parents=`5`
&hideContainers=`1`
&tpl=`latestPostsTpl`
&limit=`1`
&sortby=`publishedon`
]]
I've pasted this into a template for a page. In the resulting page, I see this:
Array
(
[tpl] => latestPostsTpl
[tplOdd] =>
[tplFirst] =>
[tplLast] =>
[sortby] => publishedon
[sortbyTV] =>
[sortbyTVType] => string
[sortbyAlias] =>
[sortbyEscaped] => 0
[sortdir] => DESC
[sortdirTV] => DESC
[limit] => 1
[offset] => 0
[tvFilters] =>
[depth] => 10
[parents] => 5
[includeContent] =>
[includeTVs] =>
[showHidden] =>
[showUnpublished] =>
[showDeleted] =>
[resources] =>
[processTVs] =>
[tvPrefix] => tv.
[idx] => 1
[first] => 1
[last] => 1
[toPlaceholder] =>
[toSeparatePlaceholders] =>
[debug] =>
[where] =>
[hideContainers] => 1
[id] => 8
[type] => document
[contentType] => text/html
[pagetitle] => First Post
[longtitle] => First Post
[description] =>
[alias] => first-post
[link_attributes] =>
[published] => 1
[pub_date] => 0
[unpub_date] => 0
[parent] => 5
[isfolder] =>
[introtext] => summary of first post
[richtext] => 1
[template] => 7
[menuindex] => 0
[searchable] => 1
[cacheable] => 1
[createdby] => 1
[createdon] => 2011-09-12 21:02:05
[editedby] => 1
[editedon] => 2011-09-12 21:03:18
[deleted] =>
[deletedon] => 0
[deletedby] => 0
[publishedon] => 2011-09-12 21:02:00
[publishedby] => 1
[menutitle] =>
[donthit] =>
[privateweb] =>
[privatemgr] =>
[content_dispo] => 0
[hidemenu] =>
[class_key] => modDocument
[context_key] => web
[content_type] => 1
[uri] => news/first-post.html
[uri_override] => 0
)
What is happening here?
Why is this call printing an array? How to I get it to just publish the target resource?
Thanks.