Add function for accessing category description from page object

This commit is contained in:
Jonathan Holvey 2017-11-11 16:52:40 +10:00
parent 052efa6603
commit e36ce4328c

View File

@ -222,6 +222,13 @@ class Page {
return $this->getValue('category');
}
// Returns the category description
public function categoryDescription()
{
global $dbCategories;
return $dbCategories->getProperty($this->categoryKey(), 'description');
}
// Returns the field from the array
// categoryMap = array( 'name'=>'', 'list'=>array() )
public function categoryMap($field)