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

Forums / General Discussions / print button on news detail page

print button on news detail page

3 posts, 1 answered
  1. Magnus
    Magnus avatar
    3 posts
    Registered:
    29 Sep 2011
    15 Nov 2011
    Link to this post
    Hi,

    is there a way I can add a print button on the detail page after the user clicked to read the news article?
    The print button is only gonna be used to print out the article and I only want it on the detail page (the full story of the article).
    I'm new to sitefinity and using 4.3.

    Any help is appreciated.
  2. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    Registered:
    24 Sep 2012
    18 Nov 2011
    Link to this post
    Hi Magnus,

     This can be done very easily by changing the template to the NewsWidget. Firstly, you can create a new .ascx control, copying the details template for the NewsWidget and adding a button to it. The default template can either be found in Sitefinity's Backend >> Design >> WidgetTemplates or inside your SDK's folders (SDK\Content\Resources\WidgetTemplates.rar). Then, after adding the button to the template, in your .ascx control's codebehind, you can write the code that does the printing on Button_click. The new template can be registered by clicking Edit button of the News Widget, then ControlDefinition > Views >NewsFrontendDetails,
    then delete the TemplateKey and in TemplatePath specify a virtual path to your user control (~/folder1/folder2/yourControl.ascx, where "~" is the root of your application).
    Hope this helps. Please let me know if you have further questions on this.

    Greetings,
    Svetoslav Petsov
    the Telerik team
    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
    Answered
  3. Magnus
    Magnus avatar
    3 posts
    Registered:
    29 Sep 2011
    18 Nov 2011
    Link to this post
    Thanks Svetoslav, it helps a lot.
3 posts, 1 answered