Project

General

Profile

Actions

Feature #82260

closed

Additional value for indexed_search result

Added by Sylvia Moschner about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2017-08-31
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:
On Location Sprint

Description

For Styling of the result of indexed_search it would be nice to have the path of the result in a seperate value.

That would make it possible to enclose the whole result in a Link (e.g. a Bootstrap List Item). That increases usabilty on smartphones extremly.

I added / changed the following lines in the SearchController.php

507 $resultData['path'] = '<a href="' . htmlspecialchars($row['data_filename']) . '"' . $targetAttribute . '>' . htmlspecialchars($row['data_filename']) . '</a>';
508 $resultData['pathraw'] = htmlspecialchars($row['data_filename']);

513 $resultData['path'] = $this->linkPage($pathId, $pathStr, [
514 'cHashParams' => $row['cHashParams'],
515 'data_page_type' => $row['data_page_type'],
516 'data_page_mp' => $pathMP,
517 'sys_language_uid' => $row['sys_language_uid']
518 ]);
519 $resultData['pathraw'] = $this->linkPage($pathId, $pathStr, [
520 'cHashParams' => $row['cHashParams'],
521 'data_page_type' => $row['data_page_type'],
522 'data_page_mp' => $pathMP,
523 'sys_language_uid' => $row['sys_language_uid']
524 ], [], true);

1316 protected function linkPage($pageUid, $linkText, $row = [], $markUpSwParams = [], $rawlink = false)

1349 if ($rawlink) {
1350 return $uri;
1351 }else {
1352 return '<a href="' . htmlspecialchars($uri) . '"' . $target . '>' . $linkText . '</a>';
1353 }

Actions

Also available in: Atom PDF