Skip to content

Commit

Permalink
Add update handle to ajax route
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Villanueva committed Feb 26, 2021
1 parent 997499e commit 8343139
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Controller/Index/Ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ public function execute(): ResultInterface
$postContent = $this->json->unserialize($this->getRequest()->getContent());
$story = $postContent['story'] ?? null;

$layout = $this->_view->getLayout();
$result = $this->resultJsonFactory->create();

$block = $this->_view
->getLayout()
$layout->getUpdate()->addHandle('storyblok_index_ajax');

$block = $layout
->createBlock(Container::class)
->setStory($story)
->toHtml();
Expand Down

0 comments on commit 8343139

Please sign in to comment.