Sharing buttons
Hi,
I want to share the button like "Print" and "email" .how can i insert in the news.
please show me the video.
regards
mansoor
Hello Mansoor,
If you would like to display a Print or an Email button for the news items you will need to change the default template of the single news items. You can find the default template in the Sitefinity's Backend -> Design -> Widget Templates -> Full news item or in the SDK's folder\Content\Resources\WidgetTemplates.rar.
Then you can create a user control (.ascx file) in your project, paste the code from the default template and add a print button as shown below:
<
asp:Button
ID
=
"printBtn"
runat
=
"server"
Text
=
"Print"
OnClick
=
"printBtn_Click"
/>
public
partial
class
CustomSingleNewsItemTemplate : System.Web.UI.UserControl
protected
void
Page_Load(
object
sender, EventArgs e)
protected
void
printBtn_Click(
object
sender, EventArgs e)
// add the code that does the printing
Hi Sabrie,
Thanks a lot for giving full detail. One think i need to add , In the settings page under basic settings we have social sharing feature in this social sharing we can choose whatever we want,so in this section why can't we insert "Print" and "email" options . this functionality we can use hole website. Is it possible ,if yes please give me full details .
Appreciate for doing this
--mansoor
Hi Mansoor,
If you would like to display buttons for social sharing, you need to go to Administration -> Settings -> Social Sharing and select which buttons to display. Please refer to the screenshot. Here you can select to display the MailTo button so that you can share your news items by e-mail.
In order to display the sharing buttons for the news items, please go to the page where the news items are populated, click the Edit button of the news widget and select the Single Items Settings tab and then Enable social share buttons.
Regards,
Sabrie Nedzhip
Telerik
Hi,
Thanks for giving information,but in social sharing option doesn't have 'Print' option, how can we get this ? and the mailTo button is just open new mail with site url ,instead of display siteurl i need to display content .Can you please share me the steps.
regards
mansoor
Hi Mansoor,
Currently Sitefinity does not provide out of the box print functionality for content items. You can follow the steps I have suggested in my previous post in this thread in order to implement a custom logic for Print and E-mail functionality for news items to fit your specific use case scenario.
Regards,
Sabrie Nedzhip
Telerik