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, ...Using page-specific ASP variables in a skinUsing page-specific ASP variables in a skin
Previous
 
Next
New Post
10/28/2008 11:16 AM
 

Hi all,

I'm creating a skin to match a site of which my DNN installation is a sub-site. I'm #including a menu file in the skin that uses ASP variables to indicate the current page (by matching the a:hover CSS for the link). The code looks like this:

<

li <% if level1="about" then response.write("class='current'") %>><a href="/about/about.asp">About FCDS</a></li>

On a non-DNN page I hard-code the variable. In DNN I've tried adding it to the Page Header Tags, using both <% level1="about"%> and a <script runat="server"> tag with no success. Any other suggestions?

Thanks!
Jerry
http://www.fcds.org/

 
New Post
10/29/2008 2:43 PM
 

OK - here's a solution:

Give the menu listitem an id: <li id="about"><a href="/about/about.asp">About FCDS</a></li>

Put a function in the Page Header Tags changing the class of the specific menu item to "current":
<script language="javascript" >
function setCurrentMenuItem() {
obj=document.getElementById("about");
obj.className="current";
}
 

Call the function from the ascx file, after the menu has been included:
script type="text/javascript" language="javascript">
setCurrentMenuItem();
</script>

Enjoy!
 

 

<

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Using page-specific ASP variables in a skinUsing page-specific ASP variables in a skin


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