mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 00:37:02 +02:00
Add support for a $page->getPageListLabel(); method which enables custom page classes to return custom markup for the page's label in the page-list.
This commit is contained in:
@@ -3852,6 +3852,25 @@ class Page extends WireData implements \Countable, WireMatchable {
|
||||
return $this->values()->getIcon($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get label markup to use in page-list or blank to use template/page-list defaults
|
||||
*
|
||||
* This method enables custom page classes to override page labels in page-list.
|
||||
* PLEASE NOTE: Inline markup is allowed so make sure to entity-encode any text field values.
|
||||
*
|
||||
* If you are looking for a hookable version, you should instead hook
|
||||
* `ProcessPageListRender::getPageLabel` which receives the Page as its first argument.
|
||||
*
|
||||
* #pw-internal
|
||||
*
|
||||
* @return string
|
||||
* @since 3.0.206
|
||||
*
|
||||
*/
|
||||
public function getPageListLabel() {
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the API variable used for managing pages of this type
|
||||
*
|
||||
|
Reference in New Issue
Block a user