+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Sharing buttons

Sharing buttons

6 posts, 0 answered
  1. Mansoor
    Mansoor avatar
    52 posts
    Registered:
    29 Jul 2013
    21 Jan 2014
    Link to this post
    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
  2. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    09 Dec 2016
    24 Jan 2014
    Link to this post
    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
  3. Mansoor
    Mansoor avatar
    52 posts
    Registered:
    29 Jul 2013
    24 Jan 2014 in reply to Sabrie Nedzhip
    Link to this post
    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
  4. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    09 Dec 2016
    28 Jan 2014
    Link to this post
    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
  5. Mansoor
    Mansoor avatar
    52 posts
    Registered:
    29 Jul 2013
    29 Jan 2014 in reply to Sabrie Nedzhip
    Link to this post
    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
  6. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    09 Dec 2016
    31 Jan 2014
    Link to this post
    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
6 posts, 0 answered