Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- Class View_Page extends Kostache {
- // Decides which nav item is selected
- protected $_selected_top_nav_item;
- public function top_nav()
- {
- // Return the nav array with url and selected status
- return array(
- array(
- 'url' => Route::url('home', ...), // Generate the url using reverse routing
- 'text' => 'Home',
- 'selected' => $this->_selected_top_nav_item === 'home',
- ),
- array(
- 'url' => Route::url('browse', ...), // Generate the url using reverse routing
- 'text' => 'Browse',
- 'selected' => $this->_selected_top_nav_item === 'browse',
- ),
- );
- }
- }
Add Comment
Please, Sign In to add comment