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

Forums / Developing with Sitefinity / Best way to implement customize Sitefinity blog bookmarks

Best way to implement customize Sitefinity blog bookmarks

4 posts, 0 answered
  1. san
    san avatar
    61 posts
    Registered:
    20 Aug 2010
    02 Sep 2011
    Link to this post
    Hello,

    I am trying to include the new google +1 button into the set of social bookmark links that appear below a Sitefinity blog post. I have read through the Sitefinity forums and I have learned that we can customize the bookmarks by editing the bookmarks template. (..\Sitefinity\ControlTemplates\Blogs\socialBookmarkTemplate.xml)



    I have looked in to the xml file and as it is just a list of nodes. All the other social bookmarks have a share url which is not yet supported yet by google +1. Google +1 is a combination of java script code and a meta tag something like:

    <g:plusone annotation="none"></g:plusone>
    <script type="text/javascript">
      (function() {
        var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
      })();
    </script>

    Is there a way that I could inject/ integrate this code into bookmarks template. I have tried inserting it into the CDATA, but I get an error because this is not in the correct format (url node). Any ideas on how I can implement this?

    Thank you for your time.


  2. san
    san avatar
    61 posts
    Registered:
    20 Aug 2010
    05 Sep 2011
    Link to this post
    Any inputs?
  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    07 Sep 2011
    Link to this post
    Hello San,

    Unortunately this cannot be achieved because of how Social Bookmarks are implemented. They do not take scripts, they only take templated urls. Since Google+ does not use this approach, it easier to use their API and add the +1 button to the template for your detail view.

    All the best,
    Radoslav Georgiev
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  4. san
    san avatar
    61 posts
    Registered:
    20 Aug 2010
    07 Sep 2011
    Link to this post
    Hello Georgiev,

    Thank you for your reply, I assumed the same thing. I found a solution by injecting Google API code in to the blog page using Jquery.

    Thank you,
Register for webinar
4 posts, 0 answered