I've made an xslt extension that find files to zip and return the path to the zip file which the xslt uses as a link.
Now I'd like to find additional files to add to the zip, and the path to these files are stored in several properties in two different document types.
I use $currentPage/@id as parameter to the extension class and I can instanciate a node from this. I can get the nodeTypeAlias BUT I cannot get the properties!
Now, I've found the solution to my first problem - albeit it may be round-about... I sent the current node id as an input parameter from xslt to my backend cs file function.
I then found out (after some trials) that I needed to work with Document instead of Node. Now I'm left with 1 type of data I'm still unable to extract directly.
If I want the physical relative path to a media folder instead of each item within it, I'm kind of stuck. I'm talking about "media/[folder name as a number]"
I have the folder id, but content type Folder doesn't contain a physical path.
Of course, I can look at the first item within and extract the actual folder name from there, but isn't there an easier way?
Hmm, working with Document api instead of using the nodeFactory may cause some performance penalties as the document api will hit the db more than you'd want it to. So, unless you're dealing with non published content, go with the nodeFactory(and Node class) instead of using the Document class api's.
Anyway, what problem did you encounter when working against the nodeFactory?
I could pull out id, name and such from node, but not the document properties. In this case they are all media picker based, save one which is a content picker.
My cs function finds all media items associated with selected documents and zip them up.
The function is triggered in a download link. It will not be used that often and it's acceptable that it takes some time.
But I appreciate the information that I should use nodeFactory if I can.
So, do you know how to get the physical folder name of a media item of content type Folder?
By the way - and this is probably the wrong place for this question - but it's related.
I've tried to upload videos to media folders in this particular case and for some reason I'm unable to get them up if the size exceeds something like 28 Mb. This seems weird to me. I've set the max request time so: maxRequestLength="104857600"
It doesn't matter whether I use the Desktop Uploader or regular Media Section Upload. What other kinds of limitations can there be?
Getting node properties from xslt extension
I've made an xslt extension that find files to zip and return the path to the zip file which the xslt uses as a link.
Now I'd like to find additional files to add to the zip, and the path to these files are stored in several properties in two different document types.
I use $currentPage/@id as parameter to the extension class and I can instanciate a node from this. I can get the nodeTypeAlias BUT I cannot get the properties!
Why is this and how should I go about it?
What version of Umbraco? nodeTypeAlias is the using the old XSLT schema, prehaps your code is mixing schema's?
Rich
Hi Rich,
I'm sorry I didn't register your reply.
Now, I've found the solution to my first problem - albeit it may be round-about... I sent the current node id as an input parameter from xslt to my backend cs file function.
I then found out (after some trials) that I needed to work with Document instead of Node. Now I'm left with 1 type of data I'm still unable to extract directly.
If I want the physical relative path to a media folder instead of each item within it, I'm kind of stuck. I'm talking about "media/[folder name as a number]"
I have the folder id, but content type Folder doesn't contain a physical path.
Of course, I can look at the first item within and extract the actual folder name from there, but isn't there an easier way?
Any thoughts?
Hmm, working with Document api instead of using the nodeFactory may cause some performance penalties as the document api will hit the db more than you'd want it to. So, unless you're dealing with non published content, go with the nodeFactory(and Node class) instead of using the Document class api's.
Anyway, what problem did you encounter when working against the nodeFactory?
Cheers,
/Dirk
Hi Dirk
I could pull out id, name and such from node, but not the document properties. In this case they are all media picker based, save one which is a content picker.
My cs function finds all media items associated with selected documents and zip them up.
The function is triggered in a download link. It will not be used that often and it's acceptable that it takes some time.
But I appreciate the information that I should use nodeFactory if I can.
So, do you know how to get the physical folder name of a media item of content type Folder?
By the way - and this is probably the wrong place for this question - but it's related.
I've tried to upload videos to media folders in this particular case and for some reason I'm unable to get them up if the size exceeds something like 28 Mb. This seems weird to me. I've set the max request time so: maxRequestLength="104857600"
It doesn't matter whether I use the Desktop Uploader or regular Media Section Upload. What other kinds of limitations can there be?
I'm using Umbraco 4.7.0
Seems I found the answer to my last question here: http://our.umbraco.org/forum/developers/api-questions/20631-Media-file-upload-problem
I was able to upload a video file of 33 MB after following the procedure there.
Now if anyone knows a really nifty way to extract the physical path of a media folder from the NodeFactory API... It would make me happy ;-)
is working on a reply...