/
Allow getting any field from current page [5.3.0-B1]
Allow getting any field from current page [5.3.0-B1]
Each page on website is represented by a category/section in the "Website & Content > Structure & Data" section. Some, but not all, of the page information can be easily accessed with the help of this tag:
<inp2:st_PageInfo type="..."/>
To be able to get just about any field of current page I'm proposing to add st_PageField
tag with following code:
/** * Returns page field. * * @param array $params Tag params. * * @return string */ protected function PageField(array $params) { /** @var kDBItem $page */ $page =& $this->_getPage($params); if ( !$page->isLoaded() ) { // No associated category found for given template. return ''; } return $this->Application->ProcessParsedTag($page->getPrefixSpecial(), 'Field', $params); }