Using AddToHead to implement og:url meta property

May 8, 2012 at 2:59 PM
Edited May 8, 2012 at 3:28 PM


I'd like to use a token PortalSettings.ActiveTab.FullUrl with a variable in the og:url meta property. How do I do this?

I now have something like this, but it doesnt work (obviously):


<fortyfingers:STYLEHELPER ID="STYLEHELPER3" AddToHead='<meta property="og:url" content="<%= PortalSettings.ActiveTab.FullUrl %>?r=s" />' runat="server" />




May 25, 2012 at 9:38 AM

FYI: (I also answered this somewhere else)

The current solution would be:

<script runat="server">
    Private Function GetMeta() as String
        Return String.Format("<meta property=""og:url"" content=""{0}?r=s"" />" , PortalSettings.ActiveTab.FullUrl)
    End function

<fortyfingers:STYLEHELPER AddToHead='<%#GetMeta()%>'  runat="server" />

The <%#...%> part get's called before the skin object is used and thus works fine.
I might add core token replace in the future, so you don't have to use these kind of hacks ;-)
Jul 4, 2012 at 9:24 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.