SubPageCode

Abstract

This topic describes how to use the SubPageCode component in SPEAK.

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.

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.

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