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, ...Multiple colored hyperlinksMultiple colored hyperlinks
Previous
 
Next
New Post
3/3/2009 8:37 AM
 

Hello,

I have a DNN page with left, content and right pane with different background colors. So, I want to define different colored hyperlinks. I know I can accomplish that by defining different classes in css but I don't want to do that because not HTML experienced people have adjust text. Is there any other way to get multiple colored Hyperlinks on one page?

 

Kins regards,

 

Marijn Ophelder

Volantis IT

 
New Post
3/3/2009 11:29 AM
 

Hi, Marijn-

Are you creating a skin to distribute or just applying the colored links to your own site?

The two approaches I'd consider are:

  1. Add Javascript directly into your skin code.
  2. Place JavaScript into a blank Text/HTML module with no container and set module to "display on all pages".

Either way, you'd end up doing the trick with JavaScript.  You want to wait until the page has completely loaded and then parse the appropriate container objects for all link tags, changing the CSS dynamically for those tags.  This insures that you override any link color settings specified by default.css, skin.css, portal.css, module code or even inline by end users.

As for parsing a page and getting collections of link tag objects, you'll use the "getElementsByTagName" method in JavaScript.  Here is a good example:

   https://developer.mozilla.org/En/DOM/Element.getElementsByTagName

...and here's my own example of how to force JavaScript to wait and run after a DNN page has completely loaded:
 
   http://www.eguanasolutions.com/DNN_Blog/EntryID/4.aspx

 
Post back to this thread if that's not enough to get you going.  Cheers!

-mamlin


esmamlin atxgeek.me
 
New Post
3/3/2009 1:57 PM
Accepted Answer 

Marijn,

 if you add the following to you skin.css:

#dnn_LeftPane a:link
{
color: green;
}

#dnn_ContentPane a:link
{
color: red;
}

your content managers don't need to do anything special.

Greetings, Peter


Peter Schotman
Cestus Websites voor DotNetNuke oplossingen in Nederland
Contact us for your custom design and skinning work.
 
New Post
3/6/2009 4:39 AM
 

Hi Mamlin,

Thank you for your response. I first tried the solution proposed by Peter Schotman because this is the most simple solution an this works for me. But, I can imagine that in some cases this solution doesn't do the trick and then I'm definately going to try your JavaScript solution.

Again, thanks for the response,

Cheers,

Marijn

 
New Post
3/6/2009 4:40 AM
 

Hi Peter,

Thank you, a very simple solution that did the trick.

Greetings,

Marijn Ophelders
Volantis IT
The Netherlands

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Multiple colored hyperlinksMultiple colored hyperlinks


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