Deliver superior customer experiences with an AI-driven platform for creating and deploying cognitive chatbots
Deliver Awesome UI with the most complete toolboxes for .NET, Web and Mobile development
Automate UI, load and performance testing for web, desktop and mobile
A complete cloud platform for an app or your entire digital business
Detect and predict anomalies by automating machine learning to achieve higher asset uptime and maximized yield
Automate decision processes with a no-code business rules engine
Optimize data integration with high-performance connectivity
Connect to any cloud or on-premises data source using a standard interface
Build engaging multi-channel web and digital experiences with intuitive web content management
Personalize and optimize the customer experience across digital touchpoints
Build, protect and deploy apps across any platform and mobile device
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.
At the moment our team is being overwhelmed with different tasks, and since updating the Developer’s Manual requires involvement of several different people, I will be patching the missing topics from the developer’s manual here on the blog. As soon as the things get back to normal, the topics will be transferred to the manual and we will continue with the regular updates (and the blog will again become the home of the more unconventional code samples). So the first post of this series is the third post on the roadmap I’ve promised we’ll finish a month or so ago – “Products” module – simple implementation. In case you are not sure what am I talking about you can check out this page of the developer’s manual to refresh your memory.
NOTE: This sample has been created and built with Sitefinity 3.5 Service Pack 1, however it will work normally with 3.5 as well. For users running Sitefinity 3.2 the sample should work as well, though you will need to change the references and implementation of RadControls. You can take a look at the first two samples in the developers manual two see how was the implementation done for 3.2.
Similarly to the categories functionality, tagging functionality is built-in part of the Generic Content module, so we will be able to add it to our products module in few very simple steps. We can divide our task into two subtasks:
Let’s start by adding tagging functionality to the admin side of our products module.
Since this article is a sequential part of the series, you should make sure that you have read the first article named Simple implementation and set up your project as it was explained there. I will reference that project throughout this article.
The first thing we want to enable is Tag Management view in the CommandPanel. Take a look at Figure 1 to see what exactly is a Tag Management view.
Figure 1: Tag Management view command in the command panel (left side) and Tag Management View (right side)
Very simple logic – in case that command name is TagsView – we switch the ControlPanel mode to Tags and refresh the ControlPanel.
Because ControlPanel in Tags mode will use TagsManagement control, we’ll need to paste the template for that control from some other Generic Content based module to our products module. Let’s use Generic_Content module as we have done so far and copy following files: ~/Sitefinity/Admin/ControlTemplates/Generic_Content/TagsManagement.ascx ~/Sitefinity/Admin/ControlTemplates/Generic_Content/App_LocalResources/TagsManagement.ascx.resx ~/Sitefinity/Admin/ControlTemplates/Genetic_Content/App_LocalResources/GenericContentTagsFAQText.txt
to following locations respectively: ~/Sitefinity/Admin/ControlTemplates/Products/ ~/Sitefinity/Admin/ControlTemplates/Products/App_LocalResources ~/Sitefinity/Admin/ControlTemplates/Products/App_LocalResources
We have successfully completed the TagsManagement implementation and now we are left with the implementation of the TagEditor control, which is used in Insert/Edit modes for selecting the tags for particular content item. Take a look at the Figure 2 to see how TagEditor controls look like:
Figure 2: TagEditor control used for tagging particular content item
In case you are wondering how did I came up with this markup… it’s simple – I’ve opened the same file in the Generic_Content folder and copied it from there. Do the same thing in this file as well: ~/Sitefinity/Admin/ControlTemplates/Products/ControlPanelEdit.ascx
Since we will need the template for TagEditor control now as well, let’s copy these two files: ~/Sitefinity/Admin/ControlTemplates/Generic_Content/TagEditor.ascx ~/Sitefinity/Admin/ControlTemplates/Generic_Content/App_LocalResources/TagEditor.ascx.resx
to these locations respectively: ~/Sitefinity/Admin/ControlTemplate/Products/ ~/Sitefinity/Admin/ControlTemplates/Products/App_LocalResources/
And that completes our work at the admin side. Now, to the the public side:
Now that we have set up Tags for the products module we can start using TagsList with our ProductsView control. Here is what you need to do:
The code for this sample can be downloaded from here.
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.
Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.