Please excuse us for the inconvenience. For security reasons we are stripping server side code from the widget templates created/edited from Sitefninty backend since Sitefinity 4.2 official release. However, it's possible to map an external template which implements the desired functionality in the code-behind. To do so, you can use the default template applied to that particular view, and create the external template in your project. Once you've built it you can go to the widget's advanced settings -> ControlDefinition->Views and select the desired view. In the dialog there should be a TemplatePath property, wehre you should specify the application relative path to the external template in your project. Please make sure to delete the value in the TemplateKey field, as otherwise the embedded template will be loaded. Restart the application and your external temp[late will be loaded for that particular widget. If you wish to map the template globally for all instances of the widget, you can go to Administration -> Controls -> ViewMap and create a new entry there. In the HostType field enter the desired VieType (example: for News widget, details View, it will be Telerik.Sitefinity.Modules.News.Web.UI.DetailsSimpleView
). In LayoutTemplate path, place the application relative path to the external template in your project. Save the changes and restart the application, an you will have your template mapped globally for all instances of the widget.
All the best,
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward!
We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>