SubPageCode

Current version: 9.0

You use the SubPageCode component to add code that is specific for an item. Sitecore only executes this code when it renders the item. The SubPageCode component is similar to the PageCode component, but it differs from the PageCode component in the following ways:

  • You use the SubPageCode component for items that are rendered by a Repeater component.

  • You add the SubPageCode component to the _Standard Values layout of the template for the items that the Repeater component renders.

Properties

Name

Description

Default

Data

PageCodeScriptFileName

Specify the folder where the script files for the item are located.

PageCodeTypeName

Specify the type name and assembly of the Page Code object to be run server-side when the page is loading.

Configuration

You can create a configuration item for a SubPageCode component by creating an item based on the SubPageCode Parameters template.

The configuration item has these specific fields:

  • PageCodeScriptFileName

  • PageCodeTypeName

Do you have some feedback for us?

If you have suggestions for improving this article,