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:

  1. where put ext js libraries.
  2. 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

  1. to use js library, must put public directory (or subdirectory of public) public/js/your_library.js
  2. 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'); 
  3. to call in layout

    -> in head:

        <head>         <?php echo $this->headscript();?>     </head> 

    -> in bottom of boddy

    <body>     ...     <?php echo $this->inlinescript(); ?> </body> 
  4. 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

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -