The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
[This post is part of the developer's manual preview published on this blog. You can find temporary TOC here.]
Similarly to the automatic command generation, base Control Panel also provides built-in breadcrumb that is automatically generated from the given View hierarchy.
The breadcrumb will take the title of the View as the text of the node, while the command will be generated automatically for you. Let us take a look at one such sample of the automatic breadcrumb.
Create a Control Panel template
<%@ Control Language="C#" %> |
<%@ Register TagPrefix="sf" Namespace="Telerik.Cms.Web.UI.Backend" Assembly="Telerik.Cms.Web.UI" %> |
<sf:BackendBreadcrumb CssClass="ContorlPanelTitle" CurrentItemCssClass="currentBCItem" ID="breadcrumb" runat="server"></sf:BackendBreadcrumb> |
<asp:PlaceHolder ID="controlPanelView" runat="server"></asp:PlaceHolder> |
Next step is to map the Control Panel template of the news module to an external template, the one we have defined few moments earlier. To do so we will paste following declaration in our Controls Config file (click here to learn more about template mappings):
<!--This template defines the layout of the Control Panel for all backend modules.--> |
<viewSettings hostType="Telerik.News.WebControls.Admin.NewsControlPanel" |
layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Common/ControlPanel.ascx" /> |
*** IMPORTANT ***
Every time you modify ControlsConfig file it is necessary to restart the application in order for the changes to be applied. While there are numerous ways to restart an application, here are few handy ones - you can restart the IIS server, resave web.config file (e.g. open web.config file, press space, press backspace, save config.file), resave global.asax file (e.g. open global.asax file, press space, press backspace, save global.asax file)…
*** END IMPORTANT ***
Now, that we have mapped the NewsControlPanel to an external template all we are left with is to hide the Breadcrumb control.
To do so we will open the template file we’ve created at the beginning of this tutorial and placed in ~/Sitefinity/Admin/ControlTemplates/Common/ControlPanel.ascx and modify it to look like this:
<%@ Control Language="C#" %> |
<%@ Register TagPrefix="sf" Namespace="Telerik.Cms.Web.UI.Backend" Assembly="Telerik.Cms.Web.UI" %> |
<div style="display:none;"> |
<sf:BackendBreadcrumb CssClass="ContorlPanelTitle" CurrentItemCssClass="currentBCItem" ID="breadcrumb" runat="server"></sf:BackendBreadcrumb> |
</div> |
<asp:PlaceHolder ID="controlPanelView" runat="server"></asp:PlaceHolder> |
*** NOTE ***
BackendBreadcrumb control is defined as required control on the Control Panel class, so we cannot simply delete it. The workaround for this is to hide it with CSS.
*** END NOTE ***
View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.
Learn MoreSubscribe to get all the news, info and tutorials you need to build better business apps and sites
Progress collects the Personal Information set out in our Privacy Policy and the Supplemental Privacy notice for residents of California and other US States and uses it for the purposes stated in that policy.
You can also ask us not to share your Personal Information to third parties here: Do Not Sell or Share My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.