From: Jurian Sluiman Date: Sun, 29 Jul 2012 09:39:18 +0000 (+0200) Subject: Prepend scripts in layout X-Git-Url: http://git.inspyration.org/?p=zf2.biz%2Fgalerie.git;a=commitdiff_plain;h=0f4956ac40ff79f8b1262fa8f6206107350cf7e2 Prepend scripts in layout When view scripts append scripts based on jQuery, they are registered last so jQuery is already loaded. --- diff --git a/module/Application/view/layout/layout.phtml b/module/Application/view/layout/layout.phtml index a26b180..47812ed 100644 --- a/module/Application/view/layout/layout.phtml +++ b/module/Application/view/layout/layout.phtml @@ -14,8 +14,8 @@ ->prependStylesheet($this->basePath() . '/css/bootstrap.min.css') ?> - headScript()->appendFile($this->basePath() . '/js/html5.js', 'text/javascript', array('conditional' => 'lt IE 9',)) - ->appendFile($this->basePath() . '/js/jquery-1.7.2.min.js') ?> + headScript()->prependFile($this->basePath() . '/js/html5.js', 'text/javascript', array('conditional' => 'lt IE 9',)) + ->prependFile($this->basePath() . '/js/jquery-1.7.2.min.js') ?>