mirror of
https://github.com/Codappix/search_core.git
synced 2024-12-23 17:36:09 +01:00
[TASK] Add typolink to index
This commit is contained in:
parent
acac544f77
commit
d0bbfb8682
2 changed files with 15 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue