I am using umbraco 4.0.4.1 and I want to make a macro to list files in a specific media folder. The contenteditor can add the macro in the editor and choose the folder from where he want's to list the content. I am using the currentMedia parameter type in the macro. My problem is when I select a folder currentMedia does not return anything. I have this xslt where folder is the currentMedia type.
<xsl:copy-of select="/macro/folder"/>
When is choose a specific file it returns the file name and location , but when I choose a folder it returns nothing.
I have tried debugging the macro by adding ?umbDebug=true which returns this:
Select media folder in macro with currentMedia
Hi
I am using umbraco 4.0.4.1 and I want to make a macro to list files in a specific media folder. The contenteditor can add the macro in the editor and choose the folder from where he want's to list the content. I am using the currentMedia parameter type in the macro. My problem is when I select a folder currentMedia does not return anything. I have this xslt where folder is the currentMedia type.
When is choose a specific file it returns the file name and location , but when I choose a folder it returns nothing.
I have tried debugging the macro by adding ?umbDebug=true which returns this:
<macro><Mappe><node id="1261" version="468943c0-cc40-4c2a-87e8-fa728cc86dc4" parentID="1260" level="2" writerID="2" nodeType="1031" template="0" sortOrder="1" createDate="2010-05-24T23:55:54" updateDate="2010-05-24T23:55:54" nodeName="Elite dokumenter" urlName="elitedokumenter" writerName="Christian Tarrild" nodeTypeAlias="Folder" path="-1,1260,1261"><data alias="contents" /></node></Mappe></macro>
How can i access the information?
Regards Tarrild
Hi Christian,
You should be able to do something like this:
/Chriztian
Yeah - there was a glitch in The Matrix as I posted that... should be:
/Chriztian
Thank you Chriztian. Worked like a charm :)
is working on a reply...