XF 1.4 Adding Facebook like to every page, some pages work & some don't

Donnie La Curan

Active member
I made this template:
Code:
<xen:require css="share_page.css" />
<div class="sharePage">
    <xen:if is="{$xenOptions.facebookLike}">
    <div class="facebookLike shareControl">
        <xen:container var="$facebookSdk">1</xen:container>
        <div class="fb-like" data-href="http://mydomain.com{$requestPaths.requestUri}" data-width="400" data-layout="standard" data-action="{$xenOptions.facebookLikeAction}" data-show-faces="true" data-colorscheme="@fbColorScheme"></div>
    </div>
    </xen:if>
</div>
Placed it where I want it to go. It shows up just fine on the homepage. But if I view a forum the like button doesn't appear. I looked at the code and it looks ok to me. The data-href is populated with the correct url. It's like the JS never loads to run it. But I looked in the footer and I see in _loadedscripts share_page = true. Any tips?

If I place the JS from Facebook to load the widget inside the template I made, then the button appears on every page.
 
Top Bottom