Google Plus one

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
8/3/2011 5:10:58 PM
Gravatar
Total Posts 40

Google Plus one

I like add a +1 button to site (in main page). In google i get the next code:

<!-- Añade esta etiqueta en la cabecera o delante de la etiqueta body. -->

<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
  {lang: 'es-419'}
</script>

<!-- Añade esta etiqueta donde quieras colocar el botón +1 -->
<g:plusone></g:plusone>

 

Where i put the script code in a page without modify the layout master?

Thank.

8/4/2011 7:22:35 AM
Gravatar
Total Posts 18439

Re: Google Plus one

We have a built in control that you can add to the layout.master file of your skin if you want to put a google plus button on every page that uses the skin.

See Adding a Google Plus Button On All Pages

Hope that helps,

Joe

8/4/2011 9:53:28 AM
Gravatar
Total Posts 40

Re: Google Plus one

Thank Joe, but I would like to select the position of the button on each page and not left on all the pages fixed in one place.

Any idea? 

Regards

8/4/2011 10:00:32 AM
Gravatar
Total Posts 18439

Re: Google Plus one

Create a UserControl as described in the hello world article and then use the <portal:PlusOneButton inside your UserControl and add the UserControl to any content region on the page just like any other feature.

Or you could just add script and markup manually in the html view of the editor in an html content instance.

The editor probably won't let you use the <g:PlusOne element because it is not valid html, but you could use the html 5 syntax.

<div class="g-plusone" data-size="standard" data-count="true"></div>

Hope that helps,

Joe

 

8/4/2011 10:13:52 AM
Gravatar
Total Posts 40

Re: Google Plus one

Thank Joe, i use html content instance with html5 syntax and all work fine!!

You must sign in to post in the forums. This thread is closed to new posts.