I have a Rails app (v2.3.8) using HAML (v3.0.25). My application.html.haml currently has the following facebook namespaces declared at the top, specifically for FBLike in a child page:
!!! 5
%html{:lang => 'en', 'xmlns:og' => 'http://ogp.me/ns#', 'xmlns:fb' => 'http://www.facebook.com/2008/fbml' }
%head
...
Is it possible to remove the facebook declaration from the application.html.haml & only declare it in my childpage.html.haml, where the FBLike & meta tags are? I would also like to keep the :lang => ‘en’ where it is at the moment; I don’t want to declare it again in all pages.
You can always make a different layout for FBML pages that has this namespace header. It’s also possible to create a view helper named something like
html_tag_attributesand use that instead:You’d define that as roughly:
You can customize this to have the behavior you want instead of the simple instance variable test.