ePages 6.10 - DE_EPAGES/Presentation/API/Object/PageType.pm

Package DE_EPAGES::Presentation::API::Object::PageType

object interface for PageType.

Base
DE_EPAGES::Object::API::Object::Object

Functions

addHelpTopic
addHelpTopicExt
basePageTypes
className
dbPackage
deleteTemplate
directHelpTopics
directHelpTopicsExt
directMenus
directSubPageTypes
directTemplates
existsDirectMenu
existsDirectTemplate
existsHelpTopic
existsHelpTopicExt
existsTemplate
helpTopics
helpTopicsExt
insertMenu
insertTemplate
loginViewAction
menu
menus
removeHelpTopic
removeHelpTopicExt
setTemplateFile
setTemplateType
subPageTypes
template
templateType
templateTypeAlias
templateTypeFolder
templateTypeFolders
templates
updateHelpTopic
updateHelpTopicExt
updateTemplate

addHelpTopic

Assign the specified Helptopic to the PageType

Syntax
$PageType->addHelpTopic($HelpTopic,$Position);
Input
$HelpTopic (object)
helptopic object

addHelpTopicExt

Assign the specified Helptopic to the PageType

Syntax
$PageType->addHelpTopicExt($HelpTopic,$Position);
Input
$HelpTopic (object)
helptopic object

basePageTypes

Returns all base page types recursively in ascending order, i.e. the main page type (which has no other base page type) is the first array element. This array includes the given page type as last element.

Syntax
$aBasePageTypes = $PageType->basePageTypes;
Return
$aBasePageTypes (reference to array of object)
list of base page types

className

Returns the class name, used for DAL access.

Syntax
$ClassName = $PageType->className;
Return
$ClassName (String)
class name

dbPackage

Returns the database package, used for DAL access.

Syntax
$DbPackage = $PageType->dbPackage;
Return
$DbPackage (String)
database package name

deleteTemplate

Deletes a template of the page type and object id

Syntax
$Deleted = $PageType->deleteTemplate( $Name, $Object );
Input
$Name (string)
template name
$Object (object)
(optional) object
Return
$Deleted (boolean)
template was deleted

directHelpTopics

Returns all HelpTopics that are directly defined on this page type.

Syntax
$aHelpTopics = $PageType->directHelpTopics;
Return
$aHelpTopics (ref.array.object)
list of helptopic objects

directHelpTopicsExt

Returns all HelpTopicsExt that are directly defined on this page type.

Syntax
$aHelpTopicsExt = $PageType->directHelpTopicsExt;
Return
$aHelpTopicsExt (ref.array.object)
list of helptopic objects

directMenus

Returns all menus that are directly defined on this page type.

Syntax
$aMenus = $PageType->directMenus;
Return
$aMenus (ref.array.object)
list of menu objects

directSubPageTypes

Returns all direct sub page types of a page type (not recursively).

Syntax
$aSubPageTypes = $PageType->directSubPageTypes;
Return
$aSubPageTypes (reference to array of object)
list of sub page types

directTemplates

Returns all direct templates of a page type.

Syntax
$aTemplates = $PageType->directTemplates($Object);
$aTemplates = $PageType->directTemplates;
Input
$Object (object)
(optional) object
Return
$aTemplates (reference to array of hash)
list of templates

existsDirectMenu

Returns true if the menu is directly defined on this page type.

Syntax
$Exists = $PageType->existsDirectMenu( $Name );
Input
$Name (string)
menu name
Return
$Exists (boolean)
true if the menu exists

existsDirectTemplate

Returns true if an template with this name and object exists for this page type and is directly assigned to it.

Syntax
$Exists = $PageType->existsDirectTemplate( $Name,$Object )
$Exists = $PageType->existsDirectTemplate( $Name )
Example
if( $PageType->existsDirectTemplate( 'ProviderDefault', LoadRootObject() ) ) { ... }
Input
$Name (string)
template name
$Object (object)
(optional) object
Return
$Exists (boolean)
true it the template exists

existsHelpTopic

Returns true if the HelpTopic is assigned to this page type.

Syntax
$Exists = $PageType->existsHelpTopic( $HelpTopic );
Input
$HelpTopic (object)
helptopic object
Return
$Exists (boolean)
true if the menu exists

existsHelpTopicExt

Returns true if the HelpTopic is assigned to this page type.

Syntax
$Exists = $PageType->existsHelpTopicExt( $HelpTopic );
Input
$HelpTopic (object)
helptopic object
Return
$Exists (boolean)
true if the menu exists

existsTemplate

Returns true if an template with this name and objectid exists for this page type.

Syntax
$Exists = $PageType->existsTemplate( $Name,$Object )
$Exists = $PageType->existsTemplate( $Name )
Example
if( $PageType->existsTemplate( 'ProviderDefault', LoadRootObject() ) ) { ... }
Input
$Name (string)
template name
$Object (object)
(optional) object
Return
$Exists (boolean)
true it the template exists

helpTopics

Returns all HelpTopics of this page type, including inherited from the base page type.

Syntax
$aHelpTopics = $PageType->helpTopics;
Return
$aHelpTopics (ref.array.object)
list of helptopic objects

helpTopicsExt

Returns all HelpTopicsExt of this page type, including inherited from the base page type.

Syntax
$aHelpTopicsExt = $PageType->helpTopicsExt;
Return
$aHelpTopicsExt (ref.array.object)
list of helptopicExt objects

insertMenu

Adds a menu to this page type.

Syntax
$Menu = $PageType->insertMenu( $hMenu );
Input
$hMenu (ref.hash)
menu parameters, see DE_EPAGES::Presentation::API::Object::Menu::insert
Return
$Menu (object)
menu object

insertTemplate

Creates a new template for the page type

Syntax
$PageType->insertTemplate( $hTemplate );
Input
$hTemplate (reference to hash)
The hash contains these keys:
  • Name - symbolic template name - varchar(255)
  • ObjectID - object id (optional default:1) - integer
  • FileName - template file name - varchar(255)
  • CartridgeID - cartridge id - integer

loginViewAction

Returns the view action for the login page using the 'LoginViewAction' attribute. If the current page type returns undef for this attribute, then it's base page type is used.

Syntax
$LoginViewAction = $PageType->loginViewAction;
Return
$LoginViewAction (object)
page type object

menu

Returns the menu by name.

Syntax
$Menu = $PageType->menu( $Name );
Example
$Menu = $PageType->menu( 'Tabs' );
Input
$Name (string)
menu name
Return
$Menu (object)
menu object

menus

Returns all menus of this page type, including inherited menus from the base page type.

Syntax
$aMenus = $PageType->menus;
Return
$aMenus (ref.array.object)
list of menu objects

removeHelpTopic

remove a specified Helptopic from the PageType

Syntax
$PageType->removeHelpTopic($HelpTopic);
Input
$HelpTopic (object)
helptopic object

removeHelpTopicExt

remove a specified Helptopic from the PageType

Syntax
$PageType->removeHelpTopicExt($HelpTopic);
Input
$HelpTopic (object)
helptopic object

setTemplateFile

Sets the template (layout option) for a given object. Reverts to the standard template if "FileName" is undefined.

Syntax
$PageType->setTemplateFile($hTemplate);
Example
$PageType->setTemplateFile( {
    Name => 'Content-Variation',
    Object => $ProductType,
    FileName => 'SF/SF-Product.Content-Variation.html',
    CartridgeID => GetPKeyCartridgeByPackage('DE_EPAGES::Product'),
} );
Input
$hTemplate (reference to hash)
with following keys:
  • Name - template name - varchar(255)
  • Object - object (e.g. ProductType or Category) - object
  • FileName - template file name - varchar(255)
  • CartridgeID - cartridge id - integer

setTemplateType

Sets the template type (layout option) for a given object. Reverts to the standard template if no TemplateTypeAlias given Occures an error via templateTypeFolder if no TemplateTypeFolderAlias given

Syntax
$PageType->setTemplateType( $Object, $TemplateTypeFolderAlias, $TemplateTypeAlias );
Example
$PageType->setTemplateType(
    $Catalog,
    'Content-Base', # i.e. alias of System/PageTypes/SF-Category/TemplateTypes/Content-Base
    '4_img_img_txt_img', # i.e. alias of System/PageTypes/SF-Category/TemplateTypes/Content-Base/4_img_img_txt_img
);
Input
$Object (object)
object
$TemplateTypeFolderAlias (string)
alias of template type folder
$TemplateTypeAlias (string)
alias of template type

subPageTypes

Returns all known sub page types of a page type recursively.

Syntax
$aSubPageTypes = $PageType->subPageTypes;
Return
$aSubPageTypes (reference to array of object)
list of sub page types

template

Returns information about a template.

Syntax
$hTemplate = $PageType->template( $Name,$Object );
Input
$Name (string)
template name
$Object (object)
(optional) object
Return
$hTemplate (reference to hash)
with following keys:
  • PageTypeID - page type id - integer
  • Name - symbolic template name - varchar(255)
  • ObjectID - object id (optional def: 1)- integer
  • FileName - template file name - varchar(255)
  • CartridgeID - cartridge id (optional)- integer

templateType

Returns the template type object with the given requirements.

Syntax
$TemplateType = $PageType->templateType( $FolderAlias, $TemplateTypeAlias );
Input
$FolderAlias (string)
name of folder
$TemplateTypeAlias (string)
name of template type
Return
$TemplateType (object)
template type object

templateTypeAlias

gets the active template type (layout option) for a given object and template type folder.

Syntax
my $TemplateTypeAlias = $PageType->templateTypeAlias( $Object, $TemplateTypeFolderAlias );
Example
my $TemplateTypeAlias = $PageType->templateTypeAlias(
    $Catalog,
    'Content-Base', # i.e. alias of System/PageTypes/SF-Category/TemplateTypes/Content-Base
);
Input
$Object (object)
object
$TemplateTypeFolderAlias (string)
alias of template type folder
Return
$TemplateTypeAlias (string)
alias of template type

templateTypeFolder

Returns all TemplateTypeFolder objects of this PageType.

Syntax
$TemplateTypeFolder = $PageType->templateTypeFolder( $Alias );
Input
$HelpTopic (string)
TemplateTypeFolder alias
Return
$TemplateTypeFolder (object)
TemplateTypeFolder object

templateTypeFolders

Returns all TemplateTypeFolder objects of this PageType.

Syntax
$aTemplateTypeFolders = $PageType->templateTypeFolders;
Return
$aTemplateTypeFolders (ref.array.object)
list of TemplateTypeFolder objects

templates

Returns all templates of a page type and object.

Syntax
$aTemplates = $PageType->templates($Object);
$aTemplates = $PageType->templates;
Input
$Object (object)
(optional) object
Return
$aTemplates (reference to array of hash)
list of templates, see template

updateHelpTopic

Updates the position of a help topic.

Syntax
$PageType->updateHelpTopic($HelpTopic, { Position => $Position });
Input
$HelpTopic (object)
helptopic object
$Position (int)
position

updateHelpTopicExt

Updates the position of an extended help topic.

Syntax
$PageType->updateHelpTopicExt($HelpTopic, { Position => $Position });
Input
$HelpTopic (object)
helptopic object
$Position (int)
position

updateTemplate

Updates attributes of a template.

Syntax
$PageType->updateTemplate( $Name, $Object, $hTemplate);
Input
$Name (string)
template name
$Object (object)
(optional) object
$hTemplate (reference to hash)
with following keys:
  • FileName - template file name - varchar(255)
  • CartridgeID - cartridge id - integer