Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...javascript code in skin file javascript code in skin file
Previous
 
Next
New Post
1/29/2008 7:02 AM
 

I need to change the style cheet for the website as user needs.

what I did is: I added a java script in my skin file that will do this job.

but I faced a problem : whenever I need to navigate to another page I lose the style that I selct and rturm me the default style.

do you have any wat that will let me to keep a selcted style in all my pages?

here is my code:

 

<%@ Control language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
<%@ Register TagPrefix="dnn" TagName="LOGO" Src="~/Admin/Skins/Logo.ascx" %>
<%@ Register TagPrefix="dnn" TagName="SOLPARTMENU" Src="~/Admin/Skins/SolPartMenu.ascx" %>
<%@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" %>
<%@ Register TagPrefix="dnn" TagName="USER" Src="~/Admin/Skins/User.ascx" %>
<%@ Register TagPrefix="dnn" TagName="COPYRIGHT" Src="~/Admin/Skins/Copyright.ascx" %>
<%@ Register TagPrefix="dnn" TagName="CurrentDate" Src="~/Admin/Skins/CurrentDate.ascx" %>
<%@ Register TagPrefix="dnn" TagName="SEARCH" Src="~/Admin/Skins/Search.ascx" %>
<%@ Register TagPrefix="dnn" TagName="LINKS" Src="~/Admin/Skins/Links.ascx" %>
<%@ Register TagPrefix="dnn" TagName="BREADCRUMB" Src="~/Admin/Skins/BreadCrumb.ascx" %>
<br>

<html>

<head>

<link rel="stylesheet" type="text/css" id="styles" href="http://localhost:2182/Rabiya/Portals/_default/Skins/tset/style1.css" />


<script type="text/javascript">

function chng(s)
{
if (s == 1)
{
document.getElementById("styles").href="http://localhost:2182/Rabiya/Portals/_default/Skins/tset/style1.css"
}

if (s == 2)
{
document.getElementById("styles").href="http://localhost:2182/Rabiya/Portals/_default/Skins/tset/style2.css"
}
if (s == 3)
{
document.getElementById("styles").href="http://localhost:2182/Rabiya/Portals/_default/Skins/tset/style3.css"
}

}
</script>

</head>

<body>

<p onclick="chng(1)">style1</p><br><br>
<p onclick="chng(2)">style2</p><br><br>
<p onclick="chng(3)">style3</p><br

 

<div id="ContentPane" runat="server" > </div>
<div><dnn:LOGIN runat="server" id="dnnLogin" />
 <p> <br>
&nbsp;</div>
<div><dnn:SOLPARTMENU
runat="server"
id="dnnSOLPARTMENU"
usearrows="true"
userootbreadcrumbarrow="false"
usesubmenubreadcrumbarrow="false"
rootmenuitemlefthtml="<span>"
rootmenuitemrighthtml="</span>"
submenuitemlefthtml="&nbsp;&nbsp;"
submenuitemrighthtml="&nbsp;&nbsp;"
rootmenuitemcssclass="rootmenuitem"
rootmenuitemselectedcssclass="rootmenuitemselected"
submenuitemcssclass="submenuitem"
submenucssclass="submenu"
submenuitemselectedcssclass="submenuitemselected"
submenuitembreadcrumbcssclass="submenuitembreadcrumb"
CSSNodeSelectedSub="submenuitembreadcrumb"
delaysubmenuload="true"
/></div>

</body>

</html>

 
New Post
1/29/2008 9:13 AM
 

well uou need to extend your code, set a cookie when skin is selected and also check for that cookie in the page load to set the skin to the one in the cookie

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...javascript code in skin file javascript code in skin file


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out