Last active
August 29, 2015 14:24
-
-
Save rianorie/e2e66529bb1b1288c5bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Location: /views/index/index.volt --> | |
Hello |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Location: app/views/index.volt --> | |
{{ getDoctype() }} | |
<html> | |
{{ partial('header') }} | |
<body> | |
<aside class="yaybar yay-shrink yay-hide-to-small yay-gestures"> | |
{{ partial('topmenu') }} | |
{{ partial('navigation')}} | |
</aside> | |
<!-- Main Content --> | |
<section class="content-wrap"> | |
<!-- Breadcrumb --> | |
{{ partial('breadcumb')}} | |
<!-- End of Breadcrumb --> | |
<!-- Content --> | |
{{ flash.output() }} | |
{{ content() }} | |
<!-- End of Content --> | |
</section> | |
<!-- End of Main Content --> | |
<!-- Footer --> | |
{{ partial('footer') }} | |
<!-- End of Footer --> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // app/controllers/IndexController.php | |
class IndexController extends \Phalcon\Mvc\Controller | |
{ | |
//Index Controller | |
public function indexAction() | |
{} | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // public/services.php (assuming from the view path) | |
// Setup the view component | |
$di->set('view', function(){ | |
$view = new View(); | |
$view->setViewsDir('../app/views/'); | |
$view->registerEngines(array(".volt" => 'Phalcon\Mvc\View\Engine\Volt', | |
'.php' => 'Phalcon\Mvc\View\Engine\Php')); | |
return $view; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment