daGrevis Posted September 21, 2011 Report Share Posted September 21, 2011 Izlasi Kohanas dokumentāciju... viss taps skaidrs. Quote Link to comment Share on other sites More sharing options...
briedis Posted September 21, 2011 Report Share Posted September 21, 2011 Grrr, izbrauc cauri šitam: http://kohanaframework.org/3.0/guide/kohana/files (vispār visai kohanas dokumentācijai) Derētu arī pastudēt, kas tas MVC princips vispār tāds ir. Quote Link to comment Share on other sites More sharing options...
laucinieks Posted September 21, 2011 Author Report Share Posted September 21, 2011 Man kaut kā nesanāk palaist kontrolieri un skatu, kur ir subfolderī. Sk - <?php defined('SYSPATH') OR die('No Direct Script Access'); Class Controller_Cms_Index extends Controller_Template { public $template = 'adminp/index'; public function action_index() { $this->template; } } ?> Tātad skats ir iekš foldera adminp un kontrolieris ir iekš foldera cms. Ja es ielieku kontrolieri bez subfoldera, tad viss aiziet. t.i. - <?php defined('SYSPATH') OR die('No Direct Script Access'); Class Controller_cms extends Controller_Template { public $template = 'adminp/index'; public function action_index() { $this->template; } } ?> Dokumentācijā, šādu gadījumu neatradu, tikai atradu pa vienam (ka vai nu kontrolieris ir subfolderī vai skats). L. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted September 21, 2011 Report Share Posted September 21, 2011 http://kohanaframework.org/3.2/guide/kohana/files/classes Quote Link to comment Share on other sites More sharing options...
marcis Posted September 21, 2011 Report Share Posted September 21, 2011 (edited) http://kohanaframewo...uting#directory - te tomēr nekas sakarīgs nav uzrakstīts :) Route'i tu vari norādīt mapi: // Controller_Admin1_<controller> Route::set('admin1(/<controller>(/<action>(/<id>)))') ->defaults(array( 'directory' => 'admin1' )); // Controller_Admin1_Admin2_<controller> Route::set('admin2(/<controller>(/<action>(/<id>)))') ->defaults(array( 'directory' => 'admin1/admin2' )); Edited September 21, 2011 by marcis Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.