1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00

Fix 2 Lister related issues with 'parent' filters/columns identified by @somatonic in ListerPro board.

This commit is contained in:
Ryan Cramer
2017-03-26 06:40:35 -04:00
parent ec4726b3df
commit 4ca684df83
2 changed files with 9 additions and 1 deletions

View File

@@ -144,6 +144,7 @@ class InputfieldSelector extends Inputfield implements ConfigurableModule {
'allowSubfieldGroups',
'allowModifiers',
'allowAddRemove',
'showFieldLabels',
'fieldsWhitelist',
'dateFormat',
'datePlaceholder',

View File

@@ -1149,6 +1149,13 @@ class ProcessPageLister extends Process implements ConfigurableModule {
reset($fields);
$isFirstCol = key($fields) == $name;
if($subname && $name == 'parent') {
// if parent and subname present, focus on just the subname value
if($value instanceof Page) $value = $value->getUnformatted($subname);
$name = $subname;
$subname = '';
}
/** @var Field $field */
$field = isset($fields[$name]) ? $fields[$name] : $this->wire('fields')->get($name);
if(is_null($value)) $value = $p->getUnformatted($name);