Sharing buttons

Posted by Community Admin on 03-Aug-2018 17:11

Sharing buttons

All Replies

Posted by Community Admin on 21-Jan-2014 00:00

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

Posted by Community Admin on 24-Jan-2014 00:00

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" />

In the code-behind of your .ascx control you will need to add the code which does the printing and build the solution:

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
        
    


After you create your custom template using the code from the default one you need to register it in Administration->Settings->Advanced -> Controls->ViewMap and create a new ViewMap. In the HostType field enter the following namespace: Telerik.Sitefinity.Modules.News.Web.UI.DetailsSimpleView, Telerik.Sitefinity.ContentModules and in the LayoutTemplatePath field write the path to your custom template. Please refer to the screenshot. Please restart the application in order for the changes to take effect.

After performing the steps above, each news item will have a Print button.

You can also check the following articles for additional information:
  1. Print button on news page
  2. Customizing Sitefinity 4 Controls with the ViewMap
  3. 5 Things: Useful Examples of the Sitefinity ViewMap

Regards,
Sabrie Nedzhip
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 24-Jan-2014 00:00

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

Posted by Community Admin on 28-Jan-2014 00:00

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

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Jan-2014 00:00

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

Posted by Community Admin on 31-Jan-2014 00:00

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

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed