print button on news detail page

Posted by Community Admin on 03-Aug-2018 12:26

print button on news detail page

All Replies

Posted by Community Admin on 15-Nov-2011 00:00

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.

Posted by Community Admin on 18-Nov-2011 00:00

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

Posted by Community Admin on 18-Nov-2011 00:00

Thanks Svetoslav, it helps a lot.

This thread is closed