Modifying the home page structure
Now you will learn how to define the content of a page template’s web part zones. Specifically, we will add a web part displaying the current time to the template used by the Home page.
- Make sure you are in the Edit mode of the Pages application.
- Select Home in the content tree.
- Open the Design tab.
You can insert web parts using the toolbar displayed on the right side of the tab. For example, type the word “time” into the search text box at the top of the toolbar. This limits the listed web parts to those that have the word “time” in their name.
Hover over the Date & time web part, hold down the mouse button and drag it from the toolbar to the bottom of the Actions zone, below the Mobile redirection web part. After you drop the web part into the zone, double-click the web part to open the Web part properties dialog.
Scroll down to the Web part container property and select Corporate Site - List box content as the value.
Click Save & Close to save the changes.
Switch to Preview mode to see how the new web part affects the appearance of the Home page.
Return to Edit mode and view the Home page on the Design tab again. The system provides an alternative way of adding web parts if you do not wish to use the toolbar.
Right-click the header of the zone where you want to insert the web part and select Add new web part in the menu.
The Select web part dialog opens, where you can look through the catalog of all available web parts. For example, the previously used Date & time web part is in the General category.
Close the dialog, since there is no reason to add the web part again.
Both ways of adding web parts achieve the same result. When instructed to add a web part to a page template in the remaining parts of this tutorial, you can choose whichever method you prefer — either the toolbar or the zone action buttons.
Developing custom web parts
You are not limited to using the default set of Kentico web parts. You can find web parts created by other developers at the Kentico Marketplace or develop your own web parts.
Testing changes without switching the view mode
You can quickly test the changes you make to the structure of the website by opening or refreshing the given page in a different browser. Note that the view mode changes if you use two tabs of the same browser.
Multiple tabs can however be useful for switching between different application in the administration interface.