Catalyst::View::Tenjin 0.050001

7.5/10 (116 أصوات )

الترجمة الالية للوصف



  • مرات التنزيل: 249
  • متطلبات التشغيل:
  • الحجم:
  • الترخيص:
  • الاصدار : 0.050001
  • اضيف في: 0000-00-00 00:00:00
  • اخر تحديث: 29/05/2012
  • الموقع علي الانترنت:



استخدام البرامج التي تم تنزيلها من موقعنا يجب أن يكون وفقاً للقوانين في بلدك.لا نوصي باستخدام برامج تنتهك القوانين في بلدك.،اذا كنت تري ان هذا المحتوي لا يتوافق مع حقوق الملكية الفكرية برجاء ابلاغنا بالضغط هنا



Description




Catalyst::View::TenjinView is a Catalyst view class for the Tenjin template engine.Your application should define a view class which is a subclass of this module. There is no helper script to create this class automatically, but you can do so easily as described in the synopsis.Once you've created the view class, you can modify your action handlers in the main application and/or controllers to forward to your view class. You might choose to do this in the end() method, for example, to automatically forward all actions to the Tenjin view class. # In MyApp or MyApp::Controller::SomeController sub end : Private { my( $self, $c ) = @_; $c->forward('MyApp::View::Tenjin'); }This module is now Moose-based, so you can use method modifiers. For example, you can perform some operation after or before this module begins processing the request or rendering the template.SYNOPSIS # create your view script/myapp_create.pl view Tenjin Tenjin  # check your new view's configuration __PACKAGE__->config( USE_STRICT => 1, INCLUDE_PATH => [ MyApp->path_to('root', 'templates') ], TEMPLATE_EXTENSION => '.html', ENCODING => 'utf8', );  # render view from lib/MyApp.pm or lib/MyApp::C::SomeController.pm sub message : Global { my ($self, $c) = @_; $c->stash->{template} = 'message.html'; $c->stash->{message} = 'Hello World!'; $c->forward('MyApp::View::Tenjin'); } # access variables from template The message is: [== $message =]. # example when CATALYST_VAR is set to 'Catalyst' Context is [== $Catalyst =]  The base is [== $Catalyst->req->base =]  The name is [== $Catalyst->config->name =]  # example when CATALYST_VAR isn't set Context is [== $c =] The base is [== $base =] The name is [== $name =] # you can also embed Perl < ?pl if ($c->action->namespace eq 'admin') { ? > < h1 >admin is not implemented yet< /h1 > < ?pl } ? >Product's homepage Requirements:

· Perl




Moshax.com only provide legal software, please help us keeping pur site legal, if you think this page is violating copyrights please let us know by clicking here Here





التعليقات علي Catalyst::View::Tenjin 0.050001
اضافة تعليق

تعليقات الفيسبوك

تعليقات الموقع