You can use web parts on both portal page templates and ASPX templates. However, with ASPX page templates, you lose the browser‑based interface — the web parts need to be added and configured in Visual Studio as standard user controls.
This page describes how to work with web parts when editing page templates through the portal engine.
Only users who have design permissions (Design web site for the Design module) can use web parts.
The Design tab allows you to view the structure of the page's template and manage the template's web parts.
Impacts of modifying page templates
The system applies all web part modifications immediately and reflects the changes on the live site. Page templates are not connected to the page's workflow. However, you can use object versioning to keep track of the changes made to a template, including its web part content (and roll back to previous versions if necessary).
When you edit the web parts on a re-usable page template that is shared by several pages, the changes affect all of the pages. If you only wish to modify the design for one of the pages, you need to as an ad-hoc template or save it as a new page template.
The most direct way to add a new web part to the template is provided by the web part toolbar, which appears on the right side of the Design tab:
If you do not wish to use the toolbar, you can add new web parts into specific zones:
The Select web part dialog opens, which contains a catalog of all available web parts. Locate specific web parts by browsing through the category tree or using the search. Click Select to confirm your selection.
When you add a new web part instance into a zone, using either the toolbar or the zone action buttons, the Web part properties dialog opens. Here you can set up the behavior of the web part by entering values into its properties.
Note
Web parts can skip the initial configuration dialog when users add new instances. To enable this behavior for a web part:
To open the configuration dialog for existing web part instances, double-click the web part's header on the Design tab or open the web part's menu () and select Configure. You can also edit properties for entire Web part zones by double-clicking their header.
Macros in web part properties
All web part properties support macro expressions. Macros allow you to insert dynamic values instead of constants. The system evaluates macros at run-time, so the web parts can work based on context-dependent values.
For web part properties that do not have text values (such as checkboxes), insert macro expressions by clicking Edit value () next to the given property. This opens a dialog where you can write the required macro.
Loading values from the properties of other web parts
Macro expressions allow you to connect the functionality or content of multiple web parts. By adding the following macros into properties, you can set up web parts that automatically adjust their behavior based on the configuration of other web parts or zones.
Note: The connected web parts or zones must be placed on the same page template.
When the system displays the page, the macros resolve into the values of the specified properties.
To relocate a web part to different positions or to other zones, drag the web part's header to the desired location.
Alternatively:
To move all web parts in a specific zone:
Copying allows you to duplicate web parts and paste them into any web part zone, including the templates of other documents on the same website.
You can copy:
The system saves the web parts and their configuration into an internal component clipboard. To paste the copied web parts into a zone, choose the target location:
You can paste the web parts any number of times. Copying different web parts (or widgets) overwrites the clipboard content. Every user in the system has their own separate clipboard.
Copy limitations
When copying web parts, the system does NOT carry over:
To remove existing web part instances from the page template:
Users with design permissions can use on-site editing to configure the properties of web parts directly while browsing the website.
The web part properties dialog opens just like when configuring web parts on the Design tab of the Pages application.
To view the entire web part structure of a page, enable the Highlight action on the on-site editing toolbar. This highlights all web parts placed on the given page.
Note
Because of master pages and page nesting, the content displayed by a page on the live website may often be loaded from several different page templates.
On-site editing mode does not differentiate between templates, so you can configure any web parts displayed on the current page, even those that actually belong to ancestor documents.
Some web parts may not have any visible output at the time when you are viewing the page. For example, pages only display paging web parts if the connected listing contains a sufficiently large number of items.
You cannot find such web parts directly on the page in on-site editing mode. However, you can still access their properties by clicking Hidden on the toolbar and configuring () the appropriate item in the drop-down.
Note: The Hidden list only includes web parts that have the potential to affect the appearance of the page. Instances of invisible web parts that only perform background functionality need to be configured in the administration interface through the Pages application.
In rare cases, web part errors may prevent the Design tab of a page from working correctly. For example due to invalid configuration of a web part or when testing custom web parts.
You can fix the page by manually editing the web part XML source of the page template: