So, I am trying to create my own custom search feature for an upcoming project. My primary reason for implementing a VB function within the XSLT file for this is purely to ease string parsing and comparisons.
I've gotten the VB code implemented; however. I am hitting a slight snag. I am able to iterate through all nodes in Umbraco, however, I cannot figure out how to dig into the data field values.
With that markup/code I have the skeleton of what I need, however I cannot figure out the proper way to retrieve the values set for each of these data types for each node. Primarily, the main rich-content editor--I can access the page names via:
At the risk of sounding like a typical StackOverflow answer (sorry, really :-), I would very much urge you to *not* use this approach - there are some major performance problems with the way MSXML handles (and compiles) inlined scripts (using the <msxsl:script> tag) - if you need custom handling, a real extension is much better - you can write it in VB even if you create an App_Code extension (one that is just a code file in the App_Code folder, so doesn't even need to compile a DLL).
That said, there is a real problem in having those pages there without some sort of disclaimer... will try to do something about that.
Hope you can use that blogpost to move your code outside of the XSLT, which I'm sure you would like to keep as simple as possible, just by calling the extensions where you need the extra functionality.
Thanks for the reply, if performance is going to be an issue I definitely want to pursue an alternative route. I am reading the page you linked to and may very well attempt that.
I have gotten my code moved to a VB file in App_Code after following along with the instructions of the link you sent over. Back to the original question, how I can dig into the node iterations to retrive data values? Each page on this instance of Umbraco has a rich-text editor with the name/alias of Content/content. I think I am just not familiar with the Umbraco class structure within VB/C#.
Retrieving Data Values via VB Code in XSLT
So, I am trying to create my own custom search feature for an upcoming project. My primary reason for implementing a VB function within the XSLT file for this is purely to ease string parsing and comparisons.
I've gotten the VB code implemented; however. I am hitting a slight snag. I am able to iterate through all nodes in Umbraco, however, I cannot figure out how to dig into the data field values.
I've been referring to this document:
http://our.umbraco.org/wiki/reference/xslt/snippets/xslt-snippet-for-vb-coders/list-all-document-types-and-generic-properties
With that markup/code I have the skeleton of what I need, however I cannot figure out the proper way to retrieve the values set for each of these data types for each node. Primarily, the main rich-content editor--I can access the page names via:
Thank you in advance!
Hi Thomas,
At the risk of sounding like a typical StackOverflow answer (sorry, really :-), I would very much urge you to *not* use this approach - there are some major performance problems with the way MSXML handles (and compiles) inlined scripts (using the <msxsl:script> tag) - if you need custom handling, a real extension is much better - you can write it in VB even if you create an App_Code extension (one that is just a code file in the App_Code folder, so doesn't even need to compile a DLL).
That said, there is a real problem in having those pages there without some sort of disclaimer... will try to do something about that.
Hope you can use that blogpost to move your code outside of the XSLT, which I'm sure you would like to keep as simple as possible, just by calling the extensions where you need the extra functionality.
/Chriztian
Thanks for the reply, if performance is going to be an issue I definitely want to pursue an alternative route. I am reading the page you linked to and may very well attempt that.
I have gotten my code moved to a VB file in App_Code after following along with the instructions of the link you sent over. Back to the original question, how I can dig into the node iterations to retrive data values? Each page on this instance of Umbraco has a rich-text editor with the name/alias of Content/content. I think I am just not familiar with the Umbraco class structure within VB/C#.
is working on a reply...