> > >
Google +1 Snippet for xWeb V4 SP2
Express yourself! Share your work with other members of the Expression Community.

Each contribution is licensed to you under a License Agreement by its owner, not Microsoft. Microsoft does not guarantee the contribution or purport to grant rights to it.

Google +1 Snippet for xWeb V4 SP2

Average Rating:  (3)
<!--

Download the Snippet and install as described below

-->
Description
Discussions (1)

  • snippet tag not recognized
    10 Posts | Last Post September 19, 2011
    • When I include the JavaScript inside the <head> tag of my master.dwt, I get the swiggly red line under the <snippet> tag that indicates it is not a recognized keyword.  I have Web 4 SP2 installed. Is there something special that needs to be do to enable snippets?
      Thanks.
    • I realize now I needed to do the install first then copy the code from the snippet tab.  But I still do not see the Google +1 button in the browser preview.
    • Are you adding both the JavaScript tag inside the <head>..</head> of the page and then the button code inside the page where you need it? See this demo page and look at the source of it to see where the two parts go. http://ew-resource.co.uk/googleplus1.html
    • I have the JavaScript tag inside the <head> of my master.dwt and the button code inside a different page.  The demo link you provided is not found.
    • The demo link works for me. Make sure the link is not wrapping, it does above.
      
      http://ew-resource.co.uk/googleplus1.html
      
      I'll check it out in a DWT, and page from a DWT. Can you post a link to a test page yourself?
    • I'v tested it with the script tag on the DWT and the +1 button on a derived page and it works as expected. Make sure vyou copy all the link below.
      
      
      http://www.ew-resource.co.uk/google-plus-one-dwt.html
    • I have not published yet, but the code in the DWT starts with:
      
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
      
      <head>
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
      <!-- #BeginEditable "doctitle" -->
      <title></title>
      <!-- #EndEditable -->
      <script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
      
      Then the code in the derived page immediately follows the first editable paragraph and looks like:
      
      			<!-- #BeginEditable "content" -->
      			<div style="background-color: #88705E;" class="auto-style3">
      				<img alt="" height="333" src="images/Banner_small.jpg" width="500" /></div>
      			<h2 class="auto-style3">Full Featured Collection and Recovery 
      			Software for All Types of Debt<g:plusone size="medium"></g:plusone>
      			</h2>
      
      
      I do see your demo page now.
      Thanks.
    • OK. If I put your code into a page it works. If you are able to publish your page somewhere I can take a look at why it's not working for you.
    • Alternatively zip the page and send it to me at ihaynesATdata-insite.co.uk. (replace the AT).
    • Thanks to your suggestion, I can now see the +1 icon.  For others out there, the suggestion was:
      
      Go to “Site – Site Settings – Preview” check the box ‘Previewing using website URL’ and then select the ‘For all web pages’ option.
      
      This will then use the dev server in xWeb which should let you preview pages with JavaScript normally.
      
      Thanks Ian!

Details

Rate it:
 
 
 
 
 
  • Share It:
    E-mail Twitter del.icio.us Digg Facebook
  • Add To Favorites
  • Published: 8/11/2011
  • Tags: Expression Web, Snippets, Google +1
  • License Information:
    This contribution is licensed to you under Creative Commons by its owner, not Microsoft. Microsoft does not guarantee the contribution or purport to grant rights to it.