zend framework - How to enable ZendX integrated Jquery in Layouts -


I am trying to understand that ZendX_JQuery will not work when used directly in a layout.

  • Generates the required code
  • Inserts JQuery script in head
  • But it is used inside the layout

    • Creates the necessary code
    • Enter the JQuery script No Tags

    Can it be removed, and how? And, if someone can answer this, then why is it doing this?

    To make it completely clear, here's what I want to do:

      //layout.phtml file & lt; Head & gt; & Lt ;? Php echo $ this- & gt; JQuery () ;? & Gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt ;? Php echo $ this- & gt; Ajax link ("likes", "/mod/instr/like/id/".$this->books['id '], array (' updates' = & gt; '# Ajaxed', 'beforeSend' = & Gt; 'Feedout')); ? & Gt; & Lt ;? Php echo $ this- & gt; Layout () - & gt; material; ? & Gt; & Lt; / Body  

    This means that I want to insert a jQuery object inside a layout. I want to put the code associated with my pocket directly into my layout file, not just the part that allows jQuery to start for the scenes that require it .

    Edit: Ok, here's the init function in Bootstrap

      protected function _initJqueryLoad () { $ View = new Zend_View (); // $ view-> AddHelp Path ('ZendX / JQuery / View / Helper /', 'ZendX_JQuery_View_Helper'); $ View- & gt; AddHelp Path ("Zendix / JQuery / Visual / Assistant", "ZendX_JQuery_View_Helper"); $ View- & gt; JQuery () - & gt; AddStylesheet ('/ js / jquery / css / ui-lightness / jquery-ui-1.7.2.custom.css') - & gt; Seltlock path ('/ js / jquery / jquery .js') - & gt; SetUiLocalPath ('/ js / jquery / js / jquery-ui-1.7.2.custom.min.js'); ZendX_JQuery :: enableView ($ view); }  

    My layout file contains a head:

       baseurl () '/ css / admin.css'); ? & Gt; & Lt ;? Php echo $ this- & gt; HeadLink () - & gt; Prepaid style sheet ($ - baseUrl). '/ Css / form.css'); ? & Gt; & Lt ;? Php echo $ this- & gt; Headset () - & gt; Prepayfile ('/ js / jp.js', 'text / javascript', '') ;? & Gt; & Lt ;? Php echo $ this- & gt; JQuery (); ? & Gt; & Lt; / Head & gt;  

    Therefore, JQuery should be enabled in each view using this view, code that runs in my thoughts but is not in my layout:

     < Code> & lt; Div id = "ajaxed" & gt; By & lt;? EhOK $ the-> Ajax link ("likes", "/mod/instr/like/id/".$this->books['id '], array (' updates' = & gt; '# juxed', 'preceded' = & Gt; 'Feedout')); Echo $ this- & gt; Ajax link ("not like", "/mod/instr/hate/id/".$this->books['id '], array (' update '=> gt;' #xx ')) ;? & Gt; & Lt; / Div & gt;  

I have experienced the same problem with AJAXLINK.

The link is generated using this assistant in a layout, but the JQUERY function, which should call AJAX in the header.

If I try in a scene, then all this works right.

EDIT: Finished editing the AJAX-code manually in layout without using AJAXLink-Assistant.

And I opened a bug report here:


Comments