How to Add Facebook's XFBML Like Button to content within a page

Author Message

Andy Woods

Wednesday 29 June 2011 10:16:25 am

I need to add Facebook's 'Like' button to a paragraph within one of my site's pages.

The code to insert is:

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="www.usincare.org.uk" send="false" width="450" show_faces="true" font=""></fb:like>

Can you tell me how I can do this please?

Thanks,

Andy

Marko Žmak

Wednesday 29 June 2011 2:57:50 pm

Very simple:

  • identify the template which is used to show this page
  • insert the code you mentioned in this template on the apropriate place

Is ths what you were looking for?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Andy Woods

Wednesday 29 June 2011 11:39:34 pm

Hi Marko,

No - I don't think that will help me.

I want to insert the 'Like' button in the middle of a page of content.

Andy

Marko Žmak

Thursday 30 June 2011 12:32:05 am

So I supose you want to insert the like button inside the online editor field?

There are two ways of doing it...

a) embeded object

You create a new class called "HTML Box" which will have a "Text block" attribute and will be used to insert custom html. Then by using the embeded view for this class it can be used to insert any custom html inside online editor.

b) custom tag

Create a custom tag that will display the desired HTML based on the attributes of the custom tag.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Andy Woods

Thursday 30 June 2011 10:26:00 am

Thanks Marko,

I couldn't get the embeded object to work but the custom tag option worked fine.

Thanks again,

Andy

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.