Zero2Cool
2013-03-06T00:13:21Z
I have two themes, one dark, one light and the overall template of the site just doesn't have a common ground between the two. So, I'd like to incorporate the Site.css into the theme.css of the selected theme from the user.

The session variable is the path of the them, but the rel"style ... is showing up on the header instead of being executed.

<link href="<%# HttpContext.Current.Session["theme"].ToString() %>" /> rel="stylesheet" type="text/css" />



I'm using one of the BETA builds ... The last one or second to last one. Any ideas?
Sponsor
tha_watcha
2013-03-06T00:29:40Z
It should be

<link href='<%# HttpContext.Current.Session["theme"].ToString() %>' rel="stylesheet" type="text/css" />


UserPostedImage
Zero2Cool
2013-03-06T01:05:50Z
That did it, thank ya!
Zero2Cool
2013-03-06T01:52:45Z
It works great for the Forum, but the other pages (e.g. About.aspx) the theme is lost. It's as if it is no longer associated with the Site.Master file anymore.

http://beta.packershome.com/About.aspx 

Zero2Cool
2013-03-06T16:12:43Z
I got it!!

I had to change this ...
<head runat="server">


to this ...
<head>



in the Site.Master file and it worked.


And use this too ..

<link href='<%= ResolveClientUrl(HttpContext.Current.Session["theme"].ToString()) %>' rel="stylesheet" type="text/css" />

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved