un Soucis avec zendx_jquery
Salut a tous voila j'ai installer Zend_x pour pouvoir mettre un plugin nivo slider (jquery dans mon application) mais le probleme c'est que j'y arrive pas les images s'affiche dans mon layout bien sur mais j'arrive pas a lancer le plugin:
voila mon Bootstap
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| <?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoload()
{
$moduleLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => APPLICATION_PATH));
return $moduleLoader;
}
protected function _initViewHelpers()
{
// doctype html5
//meta
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$view->doctype('HTML5');
$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
$view->headMeta()->setCharset('utf-8');
$view->headMeta()->appendName('description', 'RCA-RADI,RCA-RADI O.N.G organisation non gouvernementale de la République centrafricaine aussi appelée Centrafrique');
$view->headMeta()->appendName('author', 'moi');
$view->headMeta()->appendName('keywords', 'la lutte contre la pauvreté en Afrique centrale, mobilisation sociale Afrique centrale , développement');
$view->headTitle()->setSeparator(' - ');
$view->headTitle(' RCA');
// css
$view->headLink()->appendStylesheet('/css/site.css');
return $view;
}
protected function _initView() {
$view = new Zend_View();
//... code de paramétrage de votre vue : titre, doctype ...
$view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper');
//... paramètres optionnels pour les helpeurs jQuery ....
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
$viewRenderer->setView($view);
return $view;
}
} |
mon layout
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| <?php echo $this->doctype()."\r\n" ?>
<html>
<head>
<?php
echo $this->headMeta()."\r\n";
echo $this->headTitle()."\r\n";
$this->headLink()->appendStylesheet($this->baseUrl().'/styles/layout.css');
$this->headLink()->appendStylesheet($this->baseUrl().'/styles/layout.css');
echo $this->headLink()."\r\n";
echo $this->headScript()."\r\n";
$this->headScript()->appendFile($this->baseUrl().'/js/jquery-1.7.1.min');
$this->headScript()->appendFile($this->baseUrl().'/js/jquery.nivo.slider');
?>
</head>
<body>
<div id="main">
<header>
<?php echo $this->partial('entete.phtml'); ?>
</header>
<nav>
<?php echo $this->partial('navigation.phtml'); ?>
</nav>
<div id="contenu">
<?php echo $this->layout()->content; ?>
</div>
<footer>
<?php echo $this->partial('baspage.phtml'); ?>
</footer>
</div>
</body>
</html> |
ainsi que ma page contenant le slide
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <article>
<div id="slider" class="nivoSlider">
<img src="<?php echo $this->baseUrl(); ?>/images/walle.jpg" alt="logo" width="960px" height="118px" />
<img src="<?php echo $this->baseUrl(); ?>/images/nemo.jpg" alt="logo" width="960px" height="118px" />
<img src="<?php echo $this->baseUrl(); ?>/images/toystory.jpg" alt="logo" width="960px" height="118px" />
<img src="<?php echo $this->baseUrl(); ?>/images/up.jpg" alt="logo" width="960px" height="118px" />
</div>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
<?php
foreach($this->accueil as $key => $value) {
echo $value->titre.' <b></b> '.$value->texte.'<br>';
}
?>
</article> |
voila je pense que cela vient de l'implementation mais je vois pas (Merci de votre aide)