javascript - integrate ext js v4.2.1 with zend framework v1.11 -
i'm trying create application using zend framework , ext js client side.
far i've created zend app using zend_tool.
questions are:
- where put ext js libraries.
- where import them use in whole app i'm building.
well reson can't comment on post.... doydoy let me more specific
the project running, ext libraries in public/js, want layout app extjs, want know how communicate zend ext js
- to use js library, must put
public
directory (or subdirectory ofpublic
)public/js/your_library.js
to import library in app, can in controller:
-> put in head:$this->view->headscript()->prependfile($this->view->baseurl().'/js/your_library.js');
-> put in bottom of body:
$this->view->inlinescript()->prependfile($this->view->baseurl().'/js/your_library.js');
to call in layout
-> in head:
<head> <?php echo $this->headscript();?> </head>
-> in bottom of boddy
<body> ... <?php echo $this->inlinescript(); ?> </body>
to add own script
$this->view->inlinescript()->appendfile($this->view->baseurl() . '/js/your_file.js');
prependfile()
method adds top of list, , appendfile()
method adds @ end of list.
it better use prependfile
libraries jquery , appendfile
scripts need these libraries
Comments
Post a Comment