How to add meta tags to Liferay web page

Thorsten Schmid, modified 11 Years ago. New Member Posts: 2 Join Date: 8/19/14 Recent Posts
For a Facebook share button, I need to add some meta tags to a web page in Liferay. The result of the HTML code should look like the following example:


  
    <meta property="og:title" content="My website title">
    <meta property="fb:app_id" content="4711">
  
  ...


How can I do that in Liferay WITHOUT coding and WITHOUT installing additional plugins but just by configuration (e.g. in the admin control area)?

Note: For www.mydomain.com/en the content of the meta tag should be in English. For www.mydomain.com/de it should be in German. If this is not possible by configuration easily, it can be all in one single language.
thumbnail
Jack Bakker, modified 11 Years ago. Liferay Master Posts: 978 Join Date: 1/3/10 Recent Posts
There are so many social meta tags these days... When I do this I put such in theme where I also can do if/else based on language. But given your WITHOUT CODING requirement, perhaps what I write is not useful for you.
thumbnail
Julio Camarero, modified 11 Years ago. Liferay Legend Posts: 1668 Join Date: 7/15/08 Recent Posts
Hi Thorsten,

you either need to code or install some plugin ;)

You probably have a theme for your site. You can easily add those tags to your theme template. You can easily add those to a hook too.

There are some apps in the marketplace that allow you to add some tags to every page too.
Thorsten Schmid, modified 11 Years ago. New Member Posts: 2 Join Date: 8/19/14 Recent Posts
Hi Jack, hi Julio,

thanks a lot for your answers!

I added the meta tags to portal_normal.vm.
Is this what you meant by "adding them to the theme template"?
The problem then is, that the meta tags are the same for all web pages which makes the situation worse.
So I removed them again.

Some little coding would be OK, i.e. adapting some configuration files like portal_normal.vm, but I want to avoid huge code changes or deployment changes which might cause other side effects.

Which plugins or other approaches can you recommend to solve the problem?
The final solution should also support multiple languages.

Thanks for your support!
Thorsten