You need to Register for free and Login to post a message in the forum.

Forum

Subject: Skinning Question: index.html vs. index.ascx & CSS
Prev Next
You are not authorized to post a reply.

Author Messages
cfwebmasters
DNN Creative Magazine Subscriber
Nuke Newbie
Nuke Newbie
Posts:4

01 Nov 2008 2:33 PM  
Hey Guys...I've got a couple questions related to skinning in general, and not necessarily to the Skinning ToolKit, so I hope this is the right place to ask.

To begin, I just want to clarify that while I am fairly new to DotNetNuke, I have been working in ASP.NET (VB.NET & C#.NET) for the last 3 years, and have been designing on the web for the last 10.  I'm highly proficient in CSS and javascript, as well as XHTML and XML, so feel free to be technical, if necessary.

Here are my questions:

First, I just finished the tutorials on creating custom skins and uploading...but these tutorials were all based on DotNetNuke 4.5 and worked primarily with the index.html file.  In our installations of DotNetNuke, we've been working with standard .NET user controls.  So my first questions are:

Which file *should* I be using to create the skin?  The .ascx file or the .html file?  Is the .html file there for backwards compatability, while the .ascx file is preferred on .NET 2.0 and 3.5?  And, if that's the case, if the skins I create are for our clients use only, is it okay to leave out the .html file versions and not worry with backwards compatibility as much?


Second:
In the tutorial, the last video discussed using javascript to dynamically load the print.css for a printable version.  I've never seen this done, since CSS provides the @media declaration, which allows you to target items within an @media print { } block.  As I understand it, anything declared in an @media print { } block is not rendered until the media type changes, which would include backgrounds or other CSS-embedded images.  In theory, this would prevent the loading of unecessary images, and the only weight (in bytes) added to the skin.css file would be the actual text and white-space contained within the @media print { } block.  Is this correct?  If so, what's the advantage to using the javascript method provided in the tutorial?


jncraig
DNN Creative Staff
Nuke Master II
Nuke Master II
Posts:2520


01 Nov 2008 3:27 PM  
For the first question - the answer is that you get to pick. The html version is there for those who like/know html. The ascx is for those who are more comfortable with that.

If you use the html approach, DotNetNuke actually "compiles" it into an ascx file.

And, in Version 5 of DotNetNuke, there will be some simplifying changes.

Joe Craig
DNN Creative Support
Subscribe to the website
leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3426

05 Nov 2008 7:52 AM  
Hello,

DNN skinning hasn't changed from DNN2.x so all the tutorials still apply for the latest versions of DotNetNuke.

As Joe says you can use both methods but to clarify, this outlines the differences between htm and ascx methods:
Introduction to Skinning

2) For that particular tutorial, the main reason I was using JavaScript was to call up iehacks.css files as I wanted to keep my IE hacks in a separate file rather than include them in the skin.css file. Because I was using this method, I also used it to call up a print.css file which allowed me to keep the print code in a separate file as well.

There is actually no advantage on using this method, and more often than not I use the @media print method in my skins.

You may want to have a look at this tutorial:
How to Create Print Stylesheets for DotNetNuke Skins

Thanks,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
cfwebmasters
DNN Creative Magazine Subscriber
Nuke Newbie
Nuke Newbie
Posts:4

08 Nov 2008 7:33 AM  
Thank you both for your replies. 

I'm not sure how I missed that particular tutorial on skinning.  I thought I had covered them all.   So, thanks for the link to that particular one.

Lee,

Thanks for clearing up the print issue in your reply (#2).  Dynamically loading the various targeted IE stylesheets definitely makes sense, especially where certain CSS may be different for different pages, etc.  I think I was more focused on the "print" portion of that tutorial and missed where the IE hacks were being loaded as well.

Anyway, thanks for all you guys do.  You definitely de-mystify DotNetNuke for us designers and developers.

Have a great weekend.
You are not authorized to post a reply.
Forums > DotNetNuke® > DotNetNuke® Questions > Skinning Question: index.html vs. index.ascx & CSS



ActiveForums 3.7

Latest Forum Posts

RE: Can't Login! Login Page can't be accessed... by e-kreator
problem solved, thanks for the help
RE: Child portal to live site by psgrzelak
Ok the original site that I had a standard web site was jacksonnjgop.com I than created a child port...
RE: Child portal to live site by jncraig
Is there any URL that will get me to your site?
RE: Child portal to live site by jncraig
"Ok I changed the A record of the Jackson site to point to the IP address of the DNN portal. I than...
RE: Child portal to live site by jncraig
I'm sorry that I offended you.  I was trying to give an honest answer.  That answer is, I continue t...
RE: Child portal to live site by psgrzelak
Kind of a round about way of answering my question without answering it.... I prefer the straight fo...
RE: Child portal to live site by jncraig
A subscription to this site will let you view the tutorials.  I believe that will be useful.  In fac...
RE: Child portal to live site by psgrzelak
Ok I changed the A record of the Jackson site to point to the IP address of the DNN portal. I than w...
RE: DotNetNuke News 8th Dec 08 by jncraig
Yes, I'm getting an error, also. But ... you can probably get the podcast from this link: http...
RE: Can't Login! Login Page can't be accessed... by jncraig
This table is part of your DotNetNuke database.You might first want to review these tutorials to hel...
DotNetNuke News 8th Dec 08 by pwadding
When I attempt to download the  Podcast I get an error message. Tried both servers. The first few li...
RE: Can't Login! Login Page can't be accessed... by e-kreator
a database that you mean.
RE: DotNetNuke 4.9.1 and 5.0.0 by jncraig
Yes, lots of learning, lots of new things and new ways.  I played a little with Beta6 of DotNetNuke ...
RE: PDF File Content by jncraig
If you want to just serve up the PDF files as PDF files, upload them using the File Manager.  You ca...
RE: Navigating between modules by jncraig
What is the URL that is generated? To which page does it send you?
RE: New Logo cant display by jncraig
There is nothing wrong with this, provided that you did it correctly.  I would have to look at your ...
RE: Child portal to live site by jncraig
You should set DNS to point the URL to the IP address of the DotNetNuke installation.  Inside of the...
RE: PopUp Page by jncraig
To open a link in a new window, format the link this way:Link to us! It is the target="_blank" that...
RE: How to Change fckeditor alignment by jncraig
It might be easier to use a different skin for your administrative pages. There have been some ot...
RE: Can't Login! Login Page can't be accessed... by jncraig
If you have access to your database, look at the Portals table.  Make sure that LoginTabID is set to...
DotNetNuke Modules
RSS Feeds