Skip to content

Commit

Permalink
Add page title to the HTML generated by PHP (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
zgq354 authored Mar 14, 2022
1 parent 3627164 commit be96136
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Content/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public function __invoke(Document $document, ServerRequestInterface $request)

$apiDocument = $this->getApiDocument($request, $id);

$document->title = $apiDocument->data->attributes->title;

$document->content = $this->view->make('fof-pages::content.page', compact('apiDocument'));

$document->payload['apiDocument'] = $apiDocument;
Expand Down

0 comments on commit be96136

Please sign in to comment.