Does anyone know if it is possible and how to create XSLT Extensions that reside in the app_code folder and not in external DLLs. This would be really useful for code re-use where I have had to blend Umbrao with an existing system which caches lots of it's own data in its own sweet special way. The easiest way for me to get to this and bring it into the world is through an XSLT Extension and preferably in the app_code folder.
Did you work out a solution to this? I'd find it useful too.
I'm creating a custom workflow for a Contour form but when i drop the Class into App_code it isn't recognised but the same code compiled as a DLL and dropped into the bin does.
I'm writing a blog post on how to create an app_code xslt extension for umbraco 4.1, and also one for how to migrate from script blocks in your xslt file to app_code extensions (because script blocks won't work in medium trust environments, which will also be supported in umbraco 4.1!)
Thanks Doug, that's really useful information. It doesn't explain why adding code to app_code doesn't work for custom workflows in Contour though which don't get referenced in any config files and are as far as i can see just a class file whether in app_code or compiled into a dll.
I agree. With lots of projects and lots of team members and projects going back over a number of years, it is really convenient to have all the code for a website in one place, so when you are chasing functionality through the code you don't come across a black box and then have to try to find that additional project.
With good organisation it works fine and we don't run into problems, but it would just be nice to put code that belongs to a website in the website. For any elements that could be reused we put them into separate assemblies anyway, such as datatypes, so it is not a big loss, really just a nice to have. Clearly the Umbraco team think so too if it is coming into 4.1.
XSLT Extensions from app_code
Hi,
Does anyone know if it is possible and how to create XSLT Extensions that reside in the app_code folder and not in external DLLs. This would be really useful for code re-use where I have had to blend Umbrao with an existing system which caches lots of it's own data in its own sweet special way. The easiest way for me to get to this and bring it into the world is through an XSLT Extension and preferably in the app_code folder.
Any help greatly appreciated.
Cheers
Steve
Did you work out a solution to this? I'd find it useful too.
I'm creating a custom workflow for a Contour form but when i drop the Class into App_code it isn't recognised but the same code compiled as a DLL and dropped into the bin does.
Thanks
Dan
This will be coming in umbraco 4.1. Until then you either need to use an msxml:script block in your xslt or create a dll for an xslt extension.
To create script blocks in your xslt for your .net functions, check out this post: http://blog.percipientstudios.com/2009/9/21/advanced-xslt-with-net-namespaces.aspx
I'm writing a blog post on how to create an app_code xslt extension for umbraco 4.1, and also one for how to migrate from script blocks in your xslt file to app_code extensions (because script blocks won't work in medium trust environments, which will also be supported in umbraco 4.1!)
cheers,
doug.
Thanks Doug, that's really useful information. It doesn't explain why adding code to app_code doesn't work for custom workflows in Contour though which don't get referenced in any config files and are as far as i can see just a class file whether in app_code or compiled into a dll.
Thanks
Dan
Hey Steven
Did you ever find out how to create an XSLT extension from app_code files?
/Thomas
Hi Thomas,
No, I didn't. Sorry. Still the notes from Doug above look promising. Roll on 4.1.
Cheers
Steve
Why not use a Web Application project or a Class Library project and compile an assembly.
There's lot of performance benefits from having compiled assemblies rather than loss code files...
Hi Slace,
I agree. With lots of projects and lots of team members and projects going back over a number of years, it is really convenient to have all the code for a website in one place, so when you are chasing functionality through the code you don't come across a black box and then have to try to find that additional project.
With good organisation it works fine and we don't run into problems, but it would just be nice to put code that belongs to a website in the website. For any elements that could be reused we put them into separate assemblies anyway, such as datatypes, so it is not a big loss, really just a nice to have. Clearly the Umbraco team think so too if it is coming into 4.1.
Cheers
Steve
is working on a reply...