[fw-general] headScript helper problem

2009-03-12 Thread Jacky Chen
Hi guys, i enable zend_layout in my application, there are four template files, layout.phtml, header.phtml, index.phtml, footer.phtml ,to render. layout.phtml is the layout template,and header.phtml and footer.phtml rendered in layout.phtml,the code as following: layout.phtml -

Re: [fw-general] HeadScript: the first file is non append()ed ?

2009-01-30 Thread Chris Weldon
Does this happen if you try to put the headScript() calls into your view script itself and not in the action? Do you have error_reporting set to E_ALL and do you notice anything such as a notice or a warning? -- Chris Weldon On Thu, Jan 29, 2009 at 4:24 AM, Michel Morelli wrote: > Hi all. I have

[fw-general] HeadScript: the first file is non append()ed ?

2009-01-29 Thread Michel Morelli
Hi all. I have this piece of code: public function formAction() { $this->view->headScript()->appendFile('/js/myscripts.js'); $this->view->headScript()->appendFile('/js/jquery.tooltip.js'); $this->view->headScript()->appendFile('/js/jquery.dimensions2.js');

[fw-general] HeadScript still not working in 'inner' action views

2008-03-03 Thread Ɓukasz Wojciechowski
http://framework.zend.com/issues/browse/ZF-2403 This is signed as fixed but It's still not working at my case. I'm doing in my layout $this->action('actName'); and then in actNameAction view script I use $this->HeadScript()->appendFile(H.'media/js/search.js'); but that gives no effect in my hea

Re: [fw-general] HeadScript

2007-12-17 Thread dandean
This view helper should fix it: class My_View_Helper_HeadScript extends Zend_View_Helper_HeadScript { private $_scripts = array(); public function appendFile($path) { if (!in_array($path,$this->_scripts)) { array_push($this

Re: [fw-general] HeadScript

2007-12-13 Thread Ralph Schindler
yes, you can make the call, but for things like that, you might be interested in this usage case: // from views (you'd be essentially over writing the file at that index. // but this would be a application "Best practice" you'd decide for // the whole project $view->HeadScript()->offsetSetFile(-

Re: [fw-general] HeadScript

2007-12-13 Thread Richard Shank
dinok wrote: Store the scripts in an array in the registry or in an action helper. Remove duplicate keys / check before adding them (array_key_exists) and at the end you render them with the helper (for example, build an headScriptMultiple($myArray) viewHelper). Thats a good suggestion. I'm h

Re: [fw-general] HeadScript

2007-12-13 Thread dinok
Store the scripts in an array in the registry or in an action helper. Remove duplicate keys / check before adding them (array_key_exists) and at the end you render them with the helper (for example, build an headScriptMultiple($myArray) viewHelper). -- View this message in context: http://www.na

[fw-general] HeadScript

2007-12-13 Thread Richard Shank
I'm playing with the HeadScript placeholder in the incubator. I'm creating forms elements specific to jQuery. I am wanting the form element to add which files are need for the specific plugin. The problem is if I have two different plugin on the same page there is a repeat of loading the sam