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, ...Adding Images To SkinsAdding Images To Skins
Previous
 
Next
New Post
6/20/2006 10:20 PM
 

I'm trying to create my own skin for a site.  I started with one of the default skins, and changed the layout, and packaged it as the manual suggests.  I uploaded the skin package, and everything worked fine.  I then continued to edit the skin files (the ones on the actual site now) so I could see my changes as I was working.  I was only editing the layout and some colours in the .ascx and .css files.

The problem started when I wanted to add an image to my skin.  I added an img tag:  <img src="logo.jpg"/> to my .ascx file, and put the logo.jpg file in the same folder as my .ascx file.  (This is all on the server on the 'live', installed version of the skin).  Of course the image doesn't show up correctly because the path is wrong.  So I reparsed the skin, but the image still doesn't show up properly.  I tried reparsing with both the "localized" and "portable" options with no luck.  The image tag in the .ascx file stays as <img src="logo.jpg"/> .  I thought reparsing the skin made DNN prefix the logo.jpg with the appropriate path?  What's the proper way to reference the image when designing my skin (assuming the skin will be in the same folder as the image)?

BTW, I'm on DNN 4.3.0.

 
New Post
6/20/2006 11:01 PM
 

I'm a little hesitant to reply as I'm a complete 'hack' at this stuff.  I've spent the last two days dealing with skining and containers and have learned more in these two days than the last three years!

My understanding is that .ascx files do not go through the parsing like the HTML files.  If I understand correctly you either need the explicit path in the .ascx file or in the HTML file you can add <% = SkinPath %> in front of the image path, as in <img src="<% = SkinPath %> /logo.jpg"/>

By the way, I'd really avoid placing the Logo in the skin instead of using all the advantages of the [Logo] token.

Good luck, and I hope I'm right...

Paul

 
New Post
6/20/2006 11:09 PM
 

<img alt="" src="<%= SkinPath %>logo.jpg" height="43" width="20">

 
New Post
6/20/2006 11:27 PM
 

 

Excellent answer Paul.  Your understanding is spot on.


DotNetNuke Modules from Snapsis.com
 
New Post
6/21/2006 7:05 AM
 

Paul, the <% = SkinPath %> snip goes into the .ascx file, not the html file. The parsing engine adds this when creating the .ascx.  Good catch noticing it was the logo and using the skin object!

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Adding Images To SkinsAdding Images To Skins


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