Hello
I have integrated getResources and it works great. It’s a really cool tool and concept. I wan’t to use getResources to integrate ordinary resources in a sidebox, but not on all pages, and the sidebox should be page-specific, so I want to control this with a tv. It works pretty coll, but I have one document/ page/ resource on which modx displays strange data (see "Array" below) I don’t understand. I use modx2.0.8pl running on linux hoster environment. Everything else works fine.
I started with this, almost fully working, even the tv works fine:
[[!getResources? &parents=`[[*integration_target]]` &tpl=`myFirstTpl`]]
Then I discovered that one page the data look bad (see below) and thought this was related to my TV and changed the call:
[[!getResources? &parents=`[[*integration_target]]` &tpl=`myFirstTpl` &tvPrefix=“]]
Unfortunately the problem wasn’t gone, so I thought it could be simple to clean out the unwanted Array, but it was crazy, in strpos I could detect snippet-local asigned needles in the haystack, but not if I changed to the value passed (sounds so crazy can’t believe it myself...), and changed the call to this:
[[!removeArray? &input=`[[!getResources? &parents=`[[*integration_target]]` &tpl=`myFirstTpl` &tvPrefix=“]]`]]
The site structure looks like this:
Home <- page show correct data for getResouces
Page a <- page shows some kind of "Array"
Page a2
Page b
Source-Folder <- this folder holds folders for various "display sections"
Homepage-News <- this folder provides the data for Home
Entry a
Entry b
And this strange "Array" gets displayed
Array
(
[tpl] => myFirstTpl
[tplOdd] =>
[tplFirst] =>
[tplLast] =>
[sortby] => publishedon
[sortbyTV] =>
[sortbyTVType] => string
[sortbyAlias] =>
[sortbyEscaped] => 0
[sortdir] => DESC
[sortdirTV] => DESC
[limit] => 5
[offset] => 0
[tvFilters] =>
[depth] => 10
[parents] =>
[includeContent] =>
[includeTVs] =>
[showHidden] =>
[showUnpublished] =>
[showDeleted] =>
[resources] =>
[processTVs] =>
[tvPrefix] => tv.
[idx] => 1
[first] => 1
[last] => 1
[toPlaceholder] =>
[toSeparatePlaceholders] =>
[debug] =>
[where] =>
[id] => 4
[type] => document
[contentType] => text/html
[pagetitle] => correct page title value here
[longtitle] =>
[description] =>
[alias] =>
[link_attributes] =>
[published] => 1
[pub_date] => 0
[unpub_date] => 0
[parent] => 2
[isfolder] =>
[introtext] =>
[richtext] => 1
[template] => 1
[menuindex] => 0
[searchable] => 1
[cacheable] => 1
[createdby] => 1
[createdon] => 2011-04-30 19:28:44
[editedby] => 1
[editedon] => 2011-04-30 19:57:46
[deleted] =>
[deletedon] => 0
[deletedby] => 0
[publishedon] => 2011-04-30 19:28:00
[publishedby] => 1
[menutitle] =>
[donthit] =>
[haskeywords] =>
[hasmetatags] =>
[privateweb] =>
[privatemgr] =>
[content_dispo] => 0
[hidemenu] => 0
[class_key] => modDocument
[context_key] => web
[content_type] => 1
)
Any help would be welcome. Or a hint to my error.
Regards
almo