Hi folks,
I wonder if anyone out there can help me with this.
I have a content management application that I'm presently recreating with asp.net 2.0 and I'd like to allow my app to be reskinned by developers, but I'm struggling because of the installation method of my application.
Essentially my app is installed into a website by simply mapping the virtual directory /admin within the website to the precompiled cms location on the server (as a virtual directory rather than as a virtual application).
This allows the cms to be updated once for all sites using it, but when it comes to themes and skinning makes life a little difficult as the default theme for the admin interface needs to be defined in ~/admin/App_Themes/ of course ASP.NET insists on the themes being in ~/App_Themes/ (which would be fine for user defined themes). As I can see it this leaves me only two choices, both of which aren't ideal.
1) Physically copy the ~/admin/app_themes/default theme into ~/app_themes/default
I don't like this as it breaks the principle of having a single update point per server and the principle of having the app installed by simply creating a virtual directory.
2) Create a VirtualPathProvider to trap requests to /App/App_Themes/Default and redirect to the admin version
I don't like this as it appears that the virtual path provider must be part of the web site itself - I tried putting a vpp into a DLL and then referencing this in my web site, but it didn't get initialised. As such, if it does have to be part of the site itself then this would mean the developer would have to create the virtualpathprovider code to get my app up and running and this breaks the principle of having the app installed by simply creating a virtual directory.
Can anyone offer any ideas or alternatives ? As I'm very early into this re-write I'm happy to change anything, including the way the application is mapped to a website if necessary...
Cheers,
Tony