Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 22 Pomógł: 0 Dołączył: 28.10.2009 Ostrzeżenie: (0%)
|
Panie, Panowie raczkuję baaaardzo. Jak elegancko zrobić, żeby po kliknięciu w <oferta> też było widoczne menu, (ewentualny head, title). Chyba, że z takim kontrolerem już nie da rady nic elegancko zrobić?
classes/controller/index.php Kod <?php defined('SYSPATH') or die('No direct script access.'); class Controller_Index extends Controller { public function action_index() { $main_menu = new View('main_menu'); $main_menu->options = array( array( 'option_name' => 'Strona główna', 'option_url' => 'index' ), array( 'option_name' => 'Oferta', 'option_url' => 'oferta' ) ); $view = new View('index'); $view->main_menu = $main_menu->render(); $view->title = 'Witaj!'; $this->request->response = $view->render(); } } classe/controller/oferta.php Kod <?php defined('SYSPATH') or die('No direct script access.'); class Controller_Oferta extends Controller_Index { public function action_index() { } } views/index.php Kod <TABLE WIDTH=800 BORDER=1> <TR HEIGHT=30> <TD><?=$main_menu;?></TD> </TR> <TR HEIGHT=500> <TD><?=$title;?></TD> </TR> </TABLE> |
|
|
|
elita4all [Kohana]Kohana->menu->zmiana widoków 19.11.2010, 08:25:28
phpion W KO3 są bodajże metody uruchamiane przed i po wyk... 19.11.2010, 08:32:06
elita4all dzięki, wstawiłem do kontrolera i jest OK. Before ... 19.11.2010, 09:55:30 ![]() ![]() |
|
Aktualny czas: 20.12.2025 - 17:03 |