I have created my own tables in the MS-SQL database for Umbraco, now I would like to access data from those tables in my XLST macro, hove is that possible?
- write some inline c# code
- write an xslt extension
Don't have any examples on this, I'm sure a search on this forum would give some pointers.
For the latter, have a look at http://www.nibble.be/?p=60 which explains how to write and configure xslt extensions in umbraco.
Additional tip:
If you want to retrieve and use anything more than single values from your external data in your xslt you should return it as an XPathNodeIterator from the XSLT-extension. Then you can do for-each and such on the data in your xslt.
Using none Umbraco data in XSLT
I have created my own tables in the MS-SQL database for Umbraco, now I would like to access data from those tables in my XLST macro, hove is that possible?
Hi,
It' possible in two ways:
- write some inline c# code
- write an xslt extension
Don't have any examples on this, I'm sure a search on this forum would give some pointers.
For the latter, have a look at http://www.nibble.be/?p=60 which explains how to write and configure xslt extensions in umbraco.
Hope this helps.
Regards,
/Dirk
Additional tip:
If you want to retrieve and use anything more than single values from your external data in your xslt you should return it as an XPathNodeIterator from the XSLT-extension. Then you can do for-each and such on the data in your xslt.
It is really simple to do once you learn how...
is working on a reply...