IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
After you Custom Products module: Create the products details view of the Products module frontend, you create the Products view widget. To do this:
using
Telerik.Sitefinity.Modules.Pages.Web.UI;
Telerik.Sitefinity.Web.UI.ControlDesign;
Telerik.Sitefinity.Localization;
Telerik.Sitefinity.Web.UI.ContentUI;
ProductCatalogSample.Web.UI.Public.Designers;
[RequireScriptManager]
[ControlDesigner(
typeof
(ProductsDesigner))]
[PropertyEditorTitle(
(ProductsResources),
"ProductsViewTitle"
)]
public
class
ProductsView : ContentView
override
string
ModuleName
{
get
if
(String.IsNullOrEmpty(
base
.ControlDefinitionName))
return
ProductsModule.ModuleName;
.ModuleName;
}
set
.ModuleName = value;
private
bool
hidePrice =
true
;
HidePrices
this
.hidePrice;
.hidePrice = value;
ControlDefinitionName
ProductsDefinitions.FrontendDefinitionName;
.ControlDefinitionName;
.ControlDefinitionName = value;
MasterViewName
(!String.IsNullOrEmpty(
.MasterViewName))
.MasterViewName;
ProductsDefinitions.FrontendListViewName;
.MasterViewName = value;
DetailViewName
.DetailViewName))
.DetailViewName;
ProductsDefinitions.FrontendDetailViewName;
.DetailViewName = value;
EmptyLinkText
Res.Get<ProductsResources>().EditProductsSettings;
In the code above, you first set the widget designer that the widget uses. You do this via the ControlDesigner attribute. Next, you specify the module name and set the name of the configuration definition that the widget uses to construct the views. Finally, you define the views that are shown when the widget is in the ContentViewDisplayMode.Master and the ContentViewDisplayMode.Detail states. You reference the master list view and the details view.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important