Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Make it Hot! ( ...  Trying to 'import' a skin into DNN... Having problems with the included CSS Files
Previous Previous
 
Next Next
New Post 3/24/2008 12:44 PM
User is offline IceWing_mk1
54 posts
10th Ranked


Trying to 'import' a skin into DNN... Having problems with the included CSS Files 

Afternoon folks...

Ok, I've now been handed a site design, fully html'd and css'd, by my boss.  Looks decent, and most of the content is 'containerized', so the main trick I've got is to import the existing layout into a DNN skin, then create the containers and plug in the modules I've already got built. 

This 'template' I've been given has Javascript and CSS files which I need to include into the site.

I've now removed the content containers from the site and set up content panes where they will go.  Added .js to the accepted files list under host settings so that those files will upload correctly. 

Now, the problem I'm running into is that when I upload the skin, things go south.

I think I have figured out WHAT the problem is, but am not sure how to deal with it.  It is my belief that the error which is being represented by

A critical error has occurred.
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Is actually being caused by the fact that the assorted CSS (and possibly JavaScript) files which I am using on this page, are not being called correctly.  During the skin upload process, I have noticed alot of lines like this

Substituting: <link type="text/css" rel="stylesheet" media="" href="content/css/layout.css">
With: <link type="text/css" rel="stylesheet" media="" href="<%= SkinPath %>content/css/layout.css">

in the import report.   I've noticed it on the images as well, but they are showing up correctly... It's my belief that the <%= SkinPath %> occuring in the page header, where you are supposed to put links to any and all CSS files (and JS files) is whats causing the problem.  From some googling, you're not supposed to put <% into the page header, but DNN is the one doing this... As such, I'm not sure of how to solve this problem...

Any thoughts would be appreciated... I'm on a pretty tight deadline here and the longer I'm stalled by this problem in even loading the skin, the less time I can be working on content modules.


Thanks,
Brian

 

 
New Post 3/24/2008 1:27 PM
User is offline Brian Dukes
488 posts
www.engagesoftware.com
8th Ranked


Re: Trying to 'import' a skin into DNN... Having problems with the included CSS Files 

Brian,

Skins are User Controls, so they won't have access to the head.  You should put the refrerences at the top of your body.

Hope it helps,


Brian Dukes
Engage Software
St. Louis, MO
314.966.4000

The leading provider of DotNetNuke support, training and custom module development.
 
New Post 3/24/2008 7:32 PM
User is offline IceWing_mk1
54 posts
10th Ranked


Re: Trying to 'import' a skin into DNN... Having problems with the included CSS Files 

*nods* 

I see what you were saying... One issue that I noted was that the process of uploading the skin seemed to strip out the css includes that I was putting in. 

So, what you said only was 50% of the issue.  I also ended up using ResolveURL capability, having the six additional CSS files resolve into the body of the skin.  I didn't realize it at the time that I wasn't using skin.css at all... 

<link rel="stylesheet" href='<%= ResolveUrl("~/DesktopModules/path/path/path/layout.css") %>' type="text/css" />

This is a good thing, overall, because I'm going to have to have some logic working that will tell the site which CSS files to use, and the ResolveURL method works well with that. 

Downside here is that, because I'm now dependant on IIS to resolve the locations of my CSS files, I cannot see the site correctly at design time. 

Tonight's goal is to research the same functionality for JavaScript so I can get all of the JS files we have loading as well.  Once both sets of files are resolving correctly, then I've got the basics of the skin imported and then I've just got to get the new containers working and badda bing, my boss will be happy on monday...

Can you explain to me why DNN seems to strip out any additional CSS files that are included in the skin during the upload process?

Brian

 
New Post 3/24/2008 8:44 PM
User is offline Cuong Dang
288 posts
engagesoftware.com
9th Ranked


Re: Trying to 'import' a skin into DNN... Having problems with the included CSS Files 

Is there a reason that you don't want to import the CSS files to the skin.css using "@import" tag?


Cuong Dang
Engage Software
St. Louis, MO
314.966.4000



The leading provider of DotNetNuke support, training and custom module development.
 
New Post 3/25/2008 9:17 AM
User is offline IceWing_mk1
54 posts
10th Ranked


Re: Trying to 'import' a skin into DNN... Having problems with the included CSS Files 

Well, if by want, you mean, is there a reason I'm against it, then no... Or, if by want, you mean, why didn't I think of that *laughs* 

Seriously though, I'm not sure that @import, now that I'm thinking about it is a good big picture solution.  The reason for this is that I'm going to need to be able to use different CSS files, depending on what URL path I'm at, for various skins... Basically, we're going to have different CSS 'skins' for different parts of the site, all of which, hopefully, will eventually be using just a couple of actual skin files... As such, since a CSS is a text only file, and cannot contain any functional logic, simply importing all of the CSS files into a single skin.css wouldn't be a viable solution.

Brian

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Make it Hot! ( ...  Trying to 'import' a skin into DNN... Having problems with the included CSS Files
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


XCESS expertise center b.v.
Custom made modules and complete solutions for the DNN framework. Maatwerk modules en complete webtoepassingen gebaseerd op het DNN framework.
www.xcess.nl
EMAS Pro
Strategic Enrollment Management Software for Higher Education Recruitment, Retention and Financial Aid
www.emaspro.com
Subzero Solutions
Dutch / English DotNetNuke consultancy services. Custom module development in any version. Complete application integration. Small business portal hosting. Your ideas our innovation - Your success our motivation. K.v.k Amsterdam: 34236342
www.subzero-solutions.net

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP