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, ...img in a skin?img in a skin?
Previous
 
Next
New Post
2/18/2009 11:35 AM
 

We have not yet upgraded to DNN 5.0, but plan to soon.  For now I'm working on 4.9.x

 I'm working on developing a skin for a customer who wants there to be an image in the skin itself.  Moreover, they want the image to be a clickable link.  I'm trying to figure out how to do this the right way.

I've seen other skins which have images in them by virtue of background-image in the skin's css file.  This doesn't work for my purposes, as the image needs to be a clickable link.

If I try to put an <img> tag in my .ascx file, I can't figure out what to use for the src attribute.  I don't want to use an absolute url, because I need the skin to be reusable and I don't want it to call some image repository on the web that sits external to the DNN site.  I can't figure out how to use a relative path that doesn't break the moment the skin is used on a page that exists at a different level in the site's hierarchical structure.

If anyone's had success with using <img> tags in their skins and wants to share their approach, please respond.  Thanks!

 

 
New Post
2/18/2009 12:49 PM
 

theres a token called skinpath that is best used here i.e. in your skin you might have

&lt;img src="<%= SkinPath %>/images/myimage" onClick="some script here" &gt;


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
2/18/2009 12:50 PM
 

Josh Martin

 
New Post
2/18/2009 1:38 PM
 

Thanks, I just tried this out and it worked perfectly.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...img in a skin?img 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