Skip to content

Instantly share code, notes, and snippets.

@Spriz

Spriz/foo.php Secret

Created December 5, 2019 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Spriz/a33cd766a458f8c61f3ebe7bc6002160 to your computer and use it in GitHub Desktop.
Save Spriz/a33cd766a458f8c61f3ebe7bc6002160 to your computer and use it in GitHub Desktop.
<?php
$extension = 'json';
$controllerName = $this->getRequest()->getParam('controller');
$action = $this->getRequest()->getParam('action');
$this->viewBuilder()->setTemplatePath(sprintf('%s/%s/%s', $controllerName, $extension, $action));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment