0

I am new user of Magento.I am try to add owl carousel but it doesn't showing on my home page. I added the css and js in magento\skin\frontend\rwd\default\ pathin css and js folder respectively and create on static block for at admin and added following html code:-

<div id="owl-demo" class="owl-carousel">
  <div class="item"><h1>0</h1></div>
  <div class="item"><h1>1</h1></div>
  <div class="item"><h1>2</h1></div>
  <div class="item"><h1>3</h1></div>
  <div class="item"><h1>4</h1></div>
  <div class="item"><h1>5</h1></div>
  <div class="item"><h1>6</h1></div>
  <div class="item"><h1>7</h1></div>
  <div class="item"><h1>8</h1></div>
  <div class="item"><h1>9</h1></div>
  <div class="item"><h1>10</h1></div>
  <div class="item"><h1>11</h1></div>
  <div class="item"><h1>12</h1></div>
  <div class="item"><h1>13</h1></div>
  <div class="item"><h1>14</h1></div>
  <div class="item"><h1>15</h1></div>
</div>

and I want to display it on home page so added a static block widget(i.e. brand)on home page. also added following code at layout xml section:-

<reference name="head">
 <action method="addItem"><type>skin_js</type><name>js/jquery-1.11.2.min.js</name></actio‌​n> 
 <action method="addItem"><type>skin_js</type><name>skin/frontend/rwd/default/js/owl.carousel.js</name></action>
 <action method="addItem"><type>skin_css</type><name>skin/frontend/rwd/default/js/owl.carousel.min.js</name></action>
 <action method="addItem"><type>skin_css</type><name>skin/frontend/rwd/default/js/owl.homepage.js</name></action>
<action method="addCss"><type>skin_css</type><name>skin/frontend/rwd/default/css/owl.carousel.css</name></action> 
<action method="addCss"><type>skin_css</type><name>skin/frontend/rwd/default/css/owl.theme.css</name></action> 
<action method="addCss"><type>skin_css</type><name>skin/frontend/rwd/default/css/owl.transitions.css</name></actio‌​n> 
</reference> 

still it not showing in home page at frnt end.. If anything is wrong then please suggest me suitable solution to implement this activity...

3

Magento will determine the template and package path for you so all you need to add for JS and CSS is

<action method="addItem"><type>skin_js</type><name>js/owl.carousel.js</name></action>

I do see some JS files are added as CSS files, try the following

<reference name="head">
 <action method="addItem"><type>skin_js</type><name>js/jquery-1.11.2.min.js</name></actio‌​n> 
 <action method="addItem"><type>skin_js</type><name>js/owl.carousel.js</name></action>
 <action method="addItem"><type>skin_js</type><name>js/owl.carousel.min.js</name></action>
 <action method="addItem"><type>skin_js</type><name>js/owl.homepage.js</name></action>
<action method="addCss"><type>skin_css</type><name>css/owl.carousel.css</name></action> 
<action method="addCss"><type>skin_css</type><name>css/owl.theme.css</name></action> 
<action method="addCss"><type>skin_css</type><name>css/owl.transitions.css</name></actio‌​n> 
</reference> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.