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/13/2012 7:10 PM
 

The only thing my inexperienced mind could follow was: 

  • attributeList is a literal control in default.aspx that is used to set html attributes according to PortalSettings.ActiveTab.SkinDoctype in the SetSkinDoctype() method on Init stage.
  • SetSkinDoctype() is using HtmlAttributes.Add("lang", strLang) function;

The weird thing is that I use the same function in PreRender stage as SetSkinDoctype does, which is being called after the Init stage in default.aspx, but still can't get it working...


 
New Post
5/13/2012 7:46 PM
 
not sure, the prerender of controls occurs after the init of the page so it should be fine - you'll have to debug to see what is happening or else take an approach such sa http://dnnopengraph.codeplex.com/SourceControl/changeset/view/72757#1526856 (where I believe the code detects the end head tag and injects just before it)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
5/14/2012 3:59 AM
 

Yeah, I must've been a bit slow in reading the right ideas, but eventually got it working through the attributeList literal control! 

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

            Dim defaultPage As CDefault = TryCast(Me.Page, CDefault)
            Dim AttributeList As Literal = TryCast(defaultPage.FindControl("attributeList"), Literal)
            AttributeList.Text &= " xmlns:og=" & Chr(34) & "http://opengraphprotocol.org/schema/" & Chr(34)
            AttributeList.Text &= " xmlns:fb=" & Chr(34) & "http://www.facebook.com/2008/fbml" & Chr(34)

    End Sub

Thanks a lot, Cathal!

P.S. Although this problem solved, still it is not a best solution, since it depends on the literal control in default.aspx... If one day the core DNN team decides to remove (the literal control) and implement some other mechanism for html head tagging, the approach won't work.

 
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.