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

HomeHomeDevelopment and...Development and...Getting StartedGetting StartedHTML tag help needed!HTML tag help needed!
Previous
 
Next
New Post
5/12/2012 5:45 PM
 

Hi Folks!

I've been trying to add HTML tag to the page with no success. The code I use is:

Protected Sub Page_PreRender(sender As Object, e As System.EventArgs) Handles MyBase.PreRender

 Dim defaultPage As CDefault = TryCast(Me.Page, CDefault)

 defaultPage.HtmlAttributes.Add("xmlns:og", "http://opengraphprotocol.org/schema/")

 defaultPage.HtmlAttributes.Add("xmlns:fb", "http://www.facebook.com/2008/fbml")

End Sub

And the resulting page should contain:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/">

I debugged the code and it adds the tags to the page object, but eventually the resulting page tags are missing. I'm using DNN v 6.1.5. Can anybody advise what's wrong with it?

Thanks in advance!

 
New Post
5/12/2012 6:13 PM
 
id assume its because we already expose an attribute list variable that gets set in the setskindoctype method -AFAIR it clears any existing attributes. Its set during page init, so in theory it should be fine after that but perhaps it would be better to target the attributeList property i.e. attributeList.text=attributeList.text + "xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/">"

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
5/12/2012 6:14 PM
 
also, in case youre not aware of it there is an opengraph module - http://www.dotnetnuke.com/Resources/Blogs/EntryId/3264/Open-Graph-Protocol-Module-for-DotNetNuke-Released.aspx

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
5/13/2012 4:30 PM
 

Hi Cathal,

I didn't quite get, what namespace is AttributeList in... can you provide an example?

Thanks again!

 
New Post
5/13/2012 6:25 PM
 
its a server control on default.aspx - take a look at default.aspx.cs to see it in use

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedHTML tag help needed!HTML tag help needed!


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