Skip to content

Commit

Permalink
Update JsonapiController.php (#475)
Browse files Browse the repository at this point in the history
This fix allows to automatically add template files from custom theme. Without it developer should copy JsonapiController, rewrite it and add custom routes for using its own templates.
  • Loading branch information
Tantacula authored Dec 15, 2022
1 parent 26310c6 commit 2d2a6bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Aimeos/Shop/Controller/JsonapiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ protected function createClient() : \Aimeos\Client\JsonApi\Iface
$related = Route::input( 'related', Request::get( 'related' ) );

$aimeos = app( 'aimeos' )->get();
$tmplPaths = $aimeos->getTemplatePaths( 'client/jsonapi/templates' );

$context = app( 'aimeos.context' )->get();
$tmplPaths = $aimeos->getTemplatePaths( 'client/jsonapi/templates', $context->locale()->getSiteItem()->getTheme() );

$langid = $context->locale()->getLanguageId();

$context->setView( app( 'aimeos.view' )->create( $context, $tmplPaths, $langid ) );
Expand Down

0 comments on commit 2d2a6bc

Please sign in to comment.