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, ...adding Attributes to the <html> tagadding Attributes to the <html> tag
Previous
 
Next
New Post
1/10/2011 7:43 AM
 
HI
I need to add some Attributes to the <html> tag.  I note that the code in the dafault.ascx file reads <html<%= HtmlAttributeList %>>  when rendered the tag HtmlAttributeList is replaced with language="en-us".  I need to add other attributes to the list

how do I add attributes to the AttributeList?
 
New Post
2/9/2011 5:35 AM
 
Just bumping the post as I really need a answer. Thanks
 
New Post
2/9/2011 6:22 AM
 
Edmedia,

Which version of DNN you are using??,

And custom attribute which you want to include is common for all the pages or it is vary by pages??


Thanks & Regards,
Nandip Makwana

DotnetExpertGuide
 
New Post
2/9/2011 10:31 AM
 
I think you can use this (server side) script in your skin:

Dim oHtmlAs New HtmlGenericControl

            oHtml= CType(Me.Page.FindControl("Html"), HtmlGenericControl)
            oHtml.Attributes.Add("class", "test")

I used adding a class as an example
 
New Post
2/9/2011 11:37 AM
 
@TIMO: Code given by you will not work i have tested in DNN 5.6.1. This code will add attribute in the tag with HTML ID as "Head" Here it will add attribute in HEAD tag. For adding attribute to the HTML tag use following code.

SetSkinDoctype method of default.aspx.vb sets attribute for HTML tag. We can modify this method as per our need. code snippet for the same is given below. I have tasted this in 5.6.1 version.

HtmlAttributes.Add("Attribute", "Value")

This will add custom attribute in HTML tag.


Thanks & Regards,
Nandip Makwana

DotnetExpertGuide
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...adding Attributes to the <html> tagadding Attributes to the <html> tag


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