Move a facebook share button

Right now there is a share button for my product designer in the designer.tpl
I would like that button on the frontpage in my sidebar.tpl how do I get it there.

Here´s the code from the designer.tpl

[{capture append=“oxidBlock_content”}]

[{capture assign=“pageScript”}]
function snw_showTaxInfo(){

}	

function sendDesignerImageToFacebook(){
	document.getElementById("snw_designer").snw_createSnapshot("onDesignerImageStored");
}

function onDesignerImageStored(result,error){
	if(result){
		var picture = result.url;
		var infos = document.getElementById("snw_designer").snw_getInfos();
		var title = infos.product.name;
		var fb = "http://www.facebook.com/sharer.php?u=";
		var picurl = "[{$oView->getPreviewPictureUrl()}]" + picture;
		var dlink = "[{$oViewConf->getSelfLink()}]cl=designer&fnc=showFacebookFrame&title="+title+"&img="+picurl;
		
		window.open(fb+escape(dlink),"Facebook", "width=550,height=320,left=100,top=100");
	}
}

[{/capture}]
[{oxscript add=$pageScript}]

[{$designer}]

[{include file=“page/shirtnetwork/designer_description.tpl”}]

[{/capture}]

[{capture append=“oxidBlock_sidebar”}]
[{oxifcontent ident=“designerhelp” object=“oCont”}]
<div id=“designerHelpBox” class=“box”>
<h3>[{$oCont->oxcontents__oxtitle->value}]</h3>
<div class=“content”>[{$oCont->oxcontents__oxcontent->value}]</div>
</div>
[{/oxifcontent}]
[{oxifcontent ident=“facebooklikedesigner” object=“oCont”}]
<div id=“designerFbBox” class=“box”>
<h3>[{$oCont->oxcontents__oxtitle->value}]</h3>
<div class=“content”>
[{$oCont->oxcontents__oxcontent->value}]
<img onclick=“sendDesignerImageToFacebook()” src="[{$oViewConf->getImageUrl()}]facebook_icon.gif" alt="[{$oCont->oxcontents__oxtitle->value}]" style=“cursor:pointer;cursor:hand;” />
</div>
</div>
[{/oxifcontent}]
[{/capture}]
[{include file=“layout/page.tpl” sidebar=“Left”}]

changing


[{capture append="oxidBlock_content"}]

[{capture assign="pageScript"}]

to


[{capture append="oxidBlock_sidebar"}]

[{capture assign="pageScript"}]

should work.

regards

rafael

Nothing changed by doing that.

Shouldnt I copy some code to the start.tpl?

I had to make cms content with ident facebookelikedesigner.

Thanks,

And now that the fancybox is added I want the facebook share window to show up in a fancybox window instead of the pop up.

http://sitedemo.dittskal.se/designer/ on this site i see the facebook button in the sitebar.

regards

rafael

Ahh now i see.
yes if you want it on the Home Page than you have to include the Code in the start.tpl

Regards

Rafael

PS.: this works quite equal to the youtube approach

Yes, and now I changed the code back as it where before. and it´s still there.

It´s been there all along.

What I want is to have it show on the http://sitdemo.dittskal.se directly.

Thanks,

What parts of the code do I have to include?

Thanks,