THead

API Manual

THead displays a head element on a page. It displays the content enclosed in its body and the page title set by the Title property.

In addition, stylesheets and JavaScripts registered via

  • TClientScriptManager::registerStyleSheet,
  • TClientScriptManager::registerStyleSheetFile,
  • TClientScriptManager::registerHeadJavaScript and
  • TClientScriptManager::registerHeadJavaScriptFile
will also be displayed in the head.

THead also manages and displays meta tags through its MetaTags property. You can add a meta object to the collection in code dynamically, or add it in template using the following syntax

<com:THead>
  <com:TMetaTag HttpEquiv="Pragma" Content="no-cache" />
  <com:TMetaTag Name="keywords" Content="Prado" />
</com:THead>

Note, TPage has a property Head that refers to the THead control currently on the page. A page can have at most one THead control. Although not required, it is recommended to place a THead on your page. Without a THead on the page, stylesheets and javascripts in the current page theme will not be rendered.