Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steven Wilber 103 posts 98 karma points
    Dec 09, 2009 @ 16:36
    Steven Wilber
    0

    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

  • Dan Evans 631 posts 1018 karma points
    Jan 07, 2010 @ 13:26
    Dan Evans
    0

    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

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 07, 2010 @ 14:22
    Douglas Robar
    2

    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.

  • Dan Evans 631 posts 1018 karma points
    Jan 07, 2010 @ 14:28
    Dan Evans
    0

    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

  • Thomas Vestergaard 52 posts 138 karma points
    Jan 22, 2010 @ 13:47
    Thomas Vestergaard
    0

    Hey Steven

    Did you ever find out how to create an XSLT extension from app_code files?

     

    /Thomas

  • Steven Wilber 103 posts 98 karma points
    Jan 25, 2010 @ 00:45
    Steven Wilber
    0

    Hi Thomas,

    No, I didn't. Sorry. Still the notes from Doug above look promising. Roll on 4.1.

     

    Cheers

    Steve

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 25, 2010 @ 03:34
    Aaron Powell
    2

    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...

  • Steven Wilber 103 posts 98 karma points
    Jan 28, 2010 @ 21:54
    Steven Wilber
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft