| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Rotate news items in vertical right menu | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Rotate news items in vertical right menu
Hi Everyone,
I am trying to figure out how to get the news items which appear in the vertical right menu of x-cart to rotate. I have searched the form and found a couple possible starting points, and I have searched the web looking at banner rotators. Before I start messing with the templates which is my next course of action I thought I would ask 1) has anyone successfully done what I am trying to do 2) if you have would you be able to share the process steps for doing it. My intention is to have a short paragraph rotate every 5 - 10 seconds or so which highlights a different news story. I found this rotating array script: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Rotating Quotes</title> <style type="text/css"> /*<![CDATA[*/ body { background-color:#aaaaaa; } #quotes { position:absolute; left:50%; top:50%; margin:-50px 0 0 -81px; padding:20px; font-family:arial; font-size:16px; color:#000000; width:162px; height:100px; border:solid 1px #000000; background-color:#ffffff; text-align:center; } /*//]]>*/ </style> <script type="text/javascript"> //<![CDATA[ var quote=new Array(); quote[0]='This is quote number one'; /* add as many quotes as you like!*/ quote[1]='This is quote number two'; quote[2]='This is quote number three'; quote[3]='This is quote number four'; quote[4]='This is quote number five'; quote[5]='This is quote number six'; quote[6]='This is quote number seven'; quote[7]='This is quote number eight'; quote[8]='This is quote number nine'; quote[9]='This is quote number ten'; var speed=2000; /*this is the time in milliseconds adjust to suit*/ var q=0; function showQuote() { document.getElementById("quotes").innerHTML=quote[q]; q++; if(q==quote.length) { q=0; } } setInterval('showQuote()',speed); //]]> </script> </head> <body> <div id="quotes"></div> </body> </html> but is there a way to have the section in green simply select and read the last say 5 news items from the archive? L
__________________
x-cart gold 4.1.9 x-cart gold 4.1.5 www.makeuwell.com.au www.amberbebe.com Sydney Australia |
|||||||
#2
|
|||||||
|
|||||||
Re: Rotate news items in vertical right menu
hi,
how do you pass the dynamic elements to javascript array variable. could you post the code, which you implemented in x-cart site. because i already tried to implement same case to implement to tabbing content. it is like as rotating banner. thanks kannan
__________________
4.6.6 - SNK |
|||||||
#3
|
|||||||
|
|||||||
Re: Rotate news items in vertical right menu
Rotating News Items - any help?
__________________
x-cart gold 4.1.9 x-cart gold 4.1.5 www.makeuwell.com.au www.amberbebe.com Sydney Australia |
|||||||
#4
|
|||||||
|
|||||||
Re: Rotate news items in vertical right menu
I reckon I could have a crack at creating a new news.tpl file that contains the above rotating array, and referencing the publishing news items. The bit I am not sure about is how to limit it to say just the latest 5 items dynamically. any thoughts for how to do this?
__________________
x-cart gold 4.1.9 x-cart gold 4.1.5 www.makeuwell.com.au www.amberbebe.com Sydney Australia |
|||||||
|
|||
X-Cart forums © 2001-2020
|