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, ...url issuesurl issues
Previous
 
Next
New Post
12/6/2008 11:42 PM
 

With the friendly url turned on here is my problem:

On my localhost dev machine the css looks like this:
background-image:url(/mmdnn/images/mm/mybg.jpg) 

The full url is translated to: http://localhost/mmdnn/images/mm/mybg.jpg 

This works fine. BUT, when I want to copy this css file to my production server it does not work because the /mmdnn virtual directory is not there. 

I have tried these other options to have the url work in both environments but none of them work: 

- images/mm/mybg.jpg
- /images/mm/mybg.jpg
- ~/images/mm/mybg.jpg


Am I missing something. Or do I have to write one set of urls for dev and another for production (changing them every time I upload new files)? 

Any help here would be greatly appreciated.
Thanks,
Randy Leinen

 
New Post
12/7/2008 1:15 AM
 

try putting <%=SkinPath%> in front of the image paths

img src=<%=SkinPath%>images/mm/mybg.jpg%> etc etc

This is assuming you're putting the images in the /portals/#/skins/skinname/images folder, rather than the root of the website.


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
12/7/2008 2:04 AM
 

I am not familiar with SkinPath. Is that a global variable?

Also, I am not using the images in an <img> tag. I am using them as background images and referencing them through CSS. Is there a way to use the skinpath in the css?

Thanks,

Randy

 
New Post
12/7/2008 3:17 AM
 

Yes Skin Path is a global variable, in CSS the files are referenced relative to the position of the CSS file so you don't need skinpath.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...url issuesurl issues


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