By using "current()" you're sending the actual node into the GetMedia() method - you need to send the id, which should be on a data element under that node.
You need to use false() or 0 (zero) instead of 'false' to not have have GetMedia() return childnodes as well
Oh, and one more thing: Make sure you at least cache the call to GetMedia in a variable, so you're not calling it more than necessary
I think I might see one issue. The field "Files" only holds the comma seperated list of media file ids. How can this be considered a node? Might be a newbie question, just trying to figure out how I can work with this Tree Multi Picker data type.
Tree Multi Picker - Can't list out media nodes
I used the code provided by the best practice for listing download files post, but I'm not getting any output when I try and list out my download files.
My XSLT looks like this:
If I do a value-of and select the
all I get are the ids of the two uploaded files (example output - 123,124)
Anybody have any ideas why this isn't working?
Hi Matt,
Two things:
Oh, and one more thing: Make sure you at least cache the call to GetMedia in a variable, so you're not calling it more than necessary
/Chriztian
PS: Also, try searching the Wiki for GetMedia()
Thanks for the response Chriztian. The problem I'm having is that my for-each produces no data at all. No nodes, nothing. Any ideas why
won't give me nodes to iterate through?
I think I might see one issue. The field "Files" only holds the comma seperated list of media file ids. How can this be considered a node? Might be a newbie question, just trying to figure out how I can work with this Tree Multi Picker data type.
Are you sure they are comma seperated? Did you do value-off If you do copy-of, it will output the real underlying XML.
If it is a comma seperated string, you can easily split them like so:
Again, use something like:
That would give you the xml fragment that you can work with.
doing a copy-of gives me: 1160,1161
Great, so all you have to do now is the split and start using the values from there :-)
Oh you should use
Where my code says $params
OK! Thanks Sebastian. Here is what the working solution looks like for listing files out with the Tree Multi Picker package.
is working on a reply...