Skip to content

Commit

Permalink
Fix GND search JSON template
Browse files Browse the repository at this point in the history
Fluid can not find the template if setup does not happen in initializeAction()
  • Loading branch information
claussni committed Jul 2, 2019
1 parent f588874 commit 0df2dff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Classes/Controller/GndController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ class GndController extends \EWW\Dpf\Controller\AbstractController

protected $searchUrl = 'search?format=json:suggest&filter=type:SubjectHeading&size=100&q=';

public function initializeAction() {
// format needs to be configured here for Fluid to find the template file
$this->request->setFormat('json');
}

/**
*
* @param string $search
Expand All @@ -47,7 +52,6 @@ public function searchAction($search) {
$i++;
}

$this->request->setFormat('json');
$this->view->assign('results', $listArray);
}

Expand Down
File renamed without changes.

0 comments on commit 0df2dff

Please sign in to comment.