Themes and Skins

Oct 22, 2008 at 8:56 PM
Themes are working great (finally...  thanks Cristian).

The problem is now (I'm guessing this my manifest in another places also) is when using skin files.

Example skin file
<asp:HyperLink runat="server" ImageUrl="images/logo.gif" NavigateUrl="http://www.google.com" SkinId="logo" />

Normally, asp.net would render the images/logo.gif with the understanding that it really means ~/App_Themes/Theme/images/logo.gif and generate the relative url based on that understanding.

The problem here is that when using N2, the actual page may be in Templates/UI/Views and asp.net will use that as the basis for creating the relative url.

For example, visiting faq.aspx would create the following url.

<img style="border-width: 0px;" src="Templates/UI/Views/App_Themes/dashCommerce/images/logo.gif"/>

The only time the Skin tags work are when you are visiting the startpage (always default.aspx rather than templates/ui/views, etc). .NET then omits the
Templates/UI/Views/App_Themes and the url gets rendered to correctly to the image.

How would we get N2 to notify .NET to create the relative urls based the the url's path rather than the physical files path?
Oct 22, 2008 at 9:01 PM
Also, Page.ResolveUrl gets wacked also.

How are the url rewriting engines for asp.net handling this issue?
Coordinator
Oct 23, 2008 at 6:15 AM
It seems some of the theme features gets whacked by using RewritePath. I will investigate using the page http handler without rewriting but don't expect immediate results.