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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0how can i include a print.css in the header of each page?how can i include a print.css in the header of each page?
Previous
 
Next
New Post
2/29/2008 9:41 AM
 

Hi there.

I have an urgent request regarding the inclusion of a print.css to my web-page. Using the normal skin.css for viewing the page, I want there to be a different style when the user accesses the print-preview.

I've read about the media="screen" or "print" option, but I cannot figure out how to correctly include the second css file into the <head> section of every generated web-page. Unfortunately I did not find out where I could manipulate the attributes of the link-tag that identifies the .css to be used. This must be hidden somewhere in the core-code (imho in the Default.aspx and code behind in the portal's root directory(?)).

Please help me on how to include this print.css. I really have no other idea by now. (Including the second css in the skins themselves also didn't turn out.)

Thanks in advance,

David

 
New Post
3/1/2008 11:16 AM
 

In fear of putting this in the wrong (non-DNN) context, I'll just show you a way I've referenced print.css files in the past in the <head> tag.  Hopefully this will at least help you see something that has worked to better analyze what you may be trying to accomplish.

<HEAD>
   <LINK media="screen" href="../Styles.css" type="text/css" rel="stylesheet">
   <LINK media="print" href="../Print.css" type="text/css" rel="stylesheet">
 </HEAD>

 


Cameron McCarter

 
New Post
3/1/2008 2:07 PM
 

You can insert it into a page head using

Page Settings|Advanced Settings|Page Header Tags
<link rel="stylesheet" type="text/css" href="/portals/0/print.css" media="print" />

You can also add the media type directly to the css files

Portal: /Portals/0/Print.css
Skin: /Portals/0/Skins/DNN-Blue/skin.css
Module Container: /Portals/0/Skins/DNN-Blue/Containers/container.css

@media print {  Body {  color:Blue; } }

I hope this is of some help to you.


Dwayne J. Baldwin
 
New Post
4/23/2008 10:43 PM
 

hi Dwayne

I have been looking to solve the same problem, and found this answer really helpful

I have one question:

  • The Page Header Tag setting appears to be set at the individual page level.  Is there a way to apply it to ALL pages?

To some extent, it is an academic question, because I can use the @media command to resolve my problem.  If I can, I would prefer to keep separate style sheets for default/print/handheld - but I can clearly resolve my problem.

Thanks
Ian

 
New Post
4/24/2008 3:14 AM
 

I would simply modify the skin/containers which apply to a specific portal. You could modify the core to inject what you need but that would cause all portals to inherit this functionality which may require additional tricks to ensure it works when new portals/skins are added.

I hope this is of some help to you.

 


Dwayne J. Baldwin
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0how can i include a print.css in the header of each page?how can i include a print.css in the header of each page?


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