Skip to content

Commit 1f8a138

Browse files
committed
Add forPage row to PageInfo > RequestInfo panel.
1 parent 40cfe39 commit 1f8a138

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

TracyDebugger.module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static function getModuleInfo() {
2727
'summary' => __('Tracy debugger from Nette with many PW specific custom tools.', __FILE__),
2828
'author' => 'Adrian Jones',
2929
'href' => 'https://processwire.com/talk/forum/58-tracy-debugger/',
30-
'version' => '4.26.81',
30+
'version' => '4.26.82',
3131
'autoload' => 100000, // in PW 3.0.114+ higher numbers are loaded first - we want Tracy first
3232
'singular' => true,
3333
'requires' => 'ProcessWire>=2.7.2, PHP>=5.4.4',

panels/RequestInfoPanel.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,15 @@ public function getPanel() {
461461
<td>' . ($p->rootParent->viewable() ? '<a title="View Root Parent" href="'.$p->rootParent->url.'">'.$this->getLanguageVersion($p->rootParent, 'name', $userLang, true).'</a>' : '<span title="Not Viewable">'.$this->getLanguageVersion($p->rootParent, 'name', $userLang, true).'</span>') . ' (<a title="Edit Root Parent" href="'.$p->rootParent->editUrl().'">'.$p->rootParent->id.'</a>)</td>
462462
</tr>
463463
';
464+
if(method_exists($this->wire('pages')->get($p->id), 'getForPage')) {
465+
$forPage = $this->wire('pages')->get($p->id)->getForPage();
466+
$pageInfo .= '
467+
<tr>
468+
<td>forPage</td>
469+
<td>' . ($forPage->viewable() ? '<a title="View ForPage" href="'.$forPage->url.'">'.$this->getLanguageVersion($forPage, 'name', $userLang, true).'</a>' : '<span title="Not Viewable">'.$this->getLanguageVersion($forPage, 'name', $userLang, true).'</span>') . ' (<a title="Edit ForPage" href="'.$forPage->editUrl().'">'.$forPage->id.'</a>)</td>
470+
</tr>
471+
';
472+
}
464473
$prevPage = $p->prev("include=all");
465474
if($prevPage->id) {
466475
$pageInfo .= '

0 commit comments

Comments
 (0)