---
schema_version: "1"
id: 3aa9e564dc7736c8e7c6f2015ccbcf0bb3c5161bc96f606d55c545554102870b
title: Add Custom Properties to Page Templates or Widgets
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/siteforce_widget_properties_add.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.siteforce_widget_properties_add.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 5ea8d13ac60b22e3ecc98733c892525b309f7a35dd20241e16087418807e9e69
description: When you create a page template or a widget, you can add custom properties to it and specify the value and type of each property.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Add Custom Properties to Page Templates or Widgets

When you create a page template or a widget, you can add custom properties to it and specify the value and type of each property.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available for purchase in: <strong>Enterprise</strong>, <strong>Performance</strong>,
                and <strong>Unlimited</strong> Editions</p>
              <p style="margin-bottom:0;">Available (with limitations) in:
                <strong>Developer</strong> Edition
              </p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d170578e74">User
              Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d170578e74 ">To build, edit, and manage Site.com sites:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d170578e74 ">
              <p><samp class="parmname">Site.com Publisher User</samp> field enabled on the
                user detail page</p>
              <p>AND</p>
              <p style="margin-bottom:0;">Site administrator or designer role
                assigned at the site level</p>
            </td>

          </tr>
        </tbody>
      </table>

Then, by adding custom code or content blocks to the page template or widget, you can access the property values using expressions, which serve as placeholders for the values. When you or your team create a page from the template or add an instance of the widget to the page, you can update the property values to modify the instance.

When the page template or widget is open:

1. Make sure the template or widget is selected in the Page Structure pane and click **Edit Custom Properties** in the Properties pane.
2. Click **New Property**.
    
    Base is the default section, which you can rename. Sections control how properties are grouped in the Properties pane of a widget instance or page.
3. Enter the property label, which appears in the Properties pane of a widget instance or page—for example, Video URL.
4. Optionally, update the expression name that was added automatically.
    
    Expression names are case sensitive and can't include spaces.
5. Specify the property type and value.
6. Optionally, mark the property as required.
7. Add additional properties or sections as needed. Reorder items by dragging them to a new location.
8. To use a custom property, drag a **Custom Code** or a **Content Block** page element from the Page Element tab onto the page template or widget.
9. Use the syntax {!expression\_name} to reference the expression—for example, {!videoURL}.
    
    When the page loads, the expression is replaced by the property value.
10. Add any additional text you require and save your changes.
    
    For example, `Check out our video at {!videoURL}`.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_tip.png)

Tip You can also create a custom property by first typing the name of the property in custom code or a content block using expression language. For example, if you type {!videoHeight} in a content block, a new property called videoHeight is automatically added to the Properties pane of the template or widget, where you can then add a property value.

If you update a widget's properties, your changes aren’t reflected in any widget instances. Instead, you must replace existing widget instances with the latest version.

If you delete a custom property that's being used in custom code or a content block, make sure you remove any references to the property.

#### See Also

- [Custom Properties for Page Templates or Widgets Overview](https://help.salesforce.com/s/articleView?id=platform.siteforce_widget_properties_about.htm&release=264.0.0&type=5 "When you create a page template or a widget, you can add custom properties to it and specify the value and type of each property to achieve greater flexibility over how templates and widgets are reused.")
- [Custom Property Types](https://help.salesforce.com/s/articleView?id=platform.siteforce_prop_type.htm&release=264.0.0&type=5 "Property types are available when designers or site administrators create site branding properties, site custom properties, widget branding properties, and widget custom properties.")
- [About Displaying Dynamic Data Using Expressions](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_merge_fields.htm&release=264.0.0&type=5 "Site.com uses expression language to display data dynamically. Expressions serve as placeholders for data that is replaced with information when the page loads. When working with data-bound page elements or custom widget properties, you can use expressions to customize how data is displayed on the page.")
- [Create Widgets](https://help.salesforce.com/s/articleView?id=platform.siteforce_widget_create.htm&release=264.0.0&type=5 "Widgets let you create custom, reusable page elements by combining existing Site.com page elements, custom code, and CSS.")