Hi,
I was creating a skin for a portal that has a print icon over all pages. this print icon is configured with a link that call javascript function to print the current page. the htmler gave me 2 css files as one for main render and the second is for printable version and he assigned each link tag with media attripute. i was so happy to see that DotNetNuke has a styles skin object <dnn:STYLES .... ./> which we can use after registering that skinobject using the file "~/Admin/Skins/Styles.ascx"
but i noticed that it hasn't the attribute Media, it has all the other attributes and the IE conditions also. but it hasn't the Media attribute that could allow me to specify the media type of the related css file. if its for Screen, Print, etc...
so i thought to add it and here are the few lines that i ultered that styles skinobject vb file with :
file path : ~/Admin/Skins/Styles.ascx.vb
at the Fields region you can add
Private _media As String
Then adding the Media property as:
Public Property Media() As String
Get
Return _media
End Get
Set(ByVal value As String)
_media = value
End Set
End Property
and in AddStyleSheet() function you can add
If Not Media Is String.Empty Then
objLink.Attributes("Media") = Media
End If
right after the existing line
objLink.Href = skinpath + StyleSheet
thats will allow you to use Media property in the skin as following
dnn:STYLES runat="server" ID="StylesPrint" Name="printCss" media="print" StyleSheet="css/print.css" UseSkinPath="true" />
Hope that will help you in case you have similar case
regards