1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / & in linkedin social bookmark

& in linkedin social bookmark

2 posts, 0 answered
  1. Victor
    Victor avatar
    44 posts
    Registered:
    10 Mar 2009
    01 Jun 2009
    Link to this post
    I have been asked to add LinkedIn to the Social Bookmarks in Blog and News, I tried editing corresponding socialBookmarkTemplate.xml and added the following:

            <bookmark title="LinkedIn" name="LinkedIn" > 
                <url>http://www.linkedin.com/shareArticle?mini=true&amp;url={0}&amp;title={1}</url> 
            </bookmark> 
     

    This doesn't work since LinkedIn doesn't understand "&amp;" in the Url, it expects just the "&" symbol to separate parameters.

    Is there a way to "escape" the "&" in a way it gets rendered correctly?

    Now, is there any documentation on how to create these bookmarks?, I can't find any and would like to know if there are any more parameters I can pass in the url.

  2. Parvan
    Parvan avatar
    151 posts
    Registered:
    24 Sep 2012
    03 Jun 2009
    Link to this post
    Hi Victor,

    One solution is to use control adapter for Hyperlink and replace the &amp; with &. Here are the steps to accomplish this:
    1. Open and edit the file located at ~/App_Browsers/BrowserFile.browser :
    Add a line for control adapter of Hyperlink:
    <?xml version='1.0' encoding='utf-8'?> 
    <browsers> 
      <browser refID="Default"
        <controlAdapters> 
          <adapter controlType="System.Web.UI.HtmlControls.HtmlForm" adapterType="Telerik.Cms.Web.FormAdapter, Telerik.Cms" /> 
          <adapter controlType="System.Web.UI.WebControls.RadioButtonList" adapterType="Telerik.Cms.Web.UI.Adapters.RadioButtonListAdapter" /> 
          <adapter controlType="System.Web.UI.WebControls.HyperLink" adapterType="Telerik.Cms.Web.UI.Adapters.HyperLinkAdapter" /> 
        </controlAdapters> 
    ............. 

    2. Put the attached file HyperLinkAdapter.cs in your site App_Code folder.

    I hope this helps you.

    Best wishes,
    Parvan
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
2 posts, 0 answered