Nuvish Posted August 25, 2011 Share Posted August 25, 2011 I have a problem with a module. In mymodule.php i have, $title = $meta['meta_title']; $link = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; And in my tpl i have , <li class="facebook"> <a target="_blank" href="http://www.facebook.com/sharer.php?u={$link}&t={$title}">{l s='Facebook'} </a> </li> This works fine in the product page,but it doesnt work in my homepage. Can anyone help me with this? I have tried every solution,even hard coding the "u = " and the "t= " but it just won't work This has been bugging me for a while. Link to comment Share on other sites More sharing options...
Xenocide Posted August 25, 2011 Share Posted August 25, 2011 When you say "it doesn't work" what do you mean exactly? Does the <a target=..etc display but without the vars or does nothing display? Have you ran $smarty->assign("link", $link), etc in your mymodule.php file? Link to comment Share on other sites More sharing options...
Nuvish Posted August 29, 2011 Author Share Posted August 29, 2011 Yes,$smarty->assign('link',$link); and i used it in my tpl file as such, <li class="facebook"> <a target="_blank" href="http://www.facebook.com/sharer.php?u={$link}&t={$title}">{l s='Facebook'}</a> </li> It works fine in product.php page,i can post my link. But it doesnt on my homepage. When i click on the link on my homepage, the sharer opens,where i can click on post,but the page link that i want to share(homepage) should also appear,but it doesnt..even so if i click on share,it says - The message could not be posted to this Wall. Do you have any idea? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now