[TASK] Add typolink to index

This commit is contained in:
Benjamin Serfhos 2018-10-03 11:49:53 +02:00
parent acac544f77
commit d0bbfb8682
2 changed files with 15 additions and 2 deletions

View file

@ -174,6 +174,19 @@ class TcaTableService implements TcaTableServiceInterface
if (isset($record[$this->tca['ctrl']['label']]) && !isset($record['search_title'])) {
$record['search_title'] = $record[$this->tca['ctrl']['label']];
}
if (!isset($record['search_page_typolink'])) {
switch ($this->tableName) {
case 'pages':
$record['search_page_typolink'] = 't3://page?uid=' . $record['uid'];
break;
case 'sys_file':
$record['search_page_typolink'] = 't3://file?uid=' . $record['uid'];
break;
default:
$record['search_page_typolink'] = 't3://page?uid=' . $record['pid'];
break;
}
}
}
/**

View file

@ -9,9 +9,9 @@
<ul>
<f:for each="{searchResult}" as="result">
<li>
<f:link.page pageUid="{result.plainData.uid}">
<f:link.typolink parameter="{result.plainData.search_page_typolink}">
[{result.type}:{result.plainData.uid}] - {result.plainData.search_title}
</f:link.page>
</f:link.typolink>
</li>
</f:for>
</ul>