Created
May 30, 2013 19:28
-
-
Save Tim-Machine/5680455 to your computer and use it in GitHub Desktop.
example of non working blade/theme/controller layout configuration If you remove sidebar content works. If sidebar is there "variable 'content' cant be found"
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 | |
| class ExampleController extends BaseController{ | |
| protected $layout = "master.layout" | |
| protected $themePath = "/some/path/" | |
| funcion index() | |
| { | |
| $data['user'] = "some user" | |
| View::addNamespace('theme', $this->themePath); | |
| $this->layout->content = View::make('theme::index'); | |
| $this->layout->sidebar = View::make('theme::sidebar',$data); | |
| } | |
| } |
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 | |
| #master/layout.blade.php | |
| {{$content}} | |
| {{$sidebar}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment