Hi all-
I’m working on my first EE site, and while we’ve had our ups and downs, I’m finally getting close to finishing up. I’m just running into a few issues that I want to take care of and was hoping the community could provide some insight. I’m currently running EE 2.4.0.
On my homepage I’m using jCarousel (http://sorgalla.com/projects/jcarousel/) and calling entries from multiple channels that have a custom status, in this case “Featured”. Here is the code I’m using to call the entries:
<div id="mini-carousel">
<ul id="mycarousel" class="jcarousel-skin-tango">
{exp:channel:entries channel="accessories|bridal|gift-items|jewelry|timepieces" status="featured" orderby="random"}
<li>
<span>img src="{product_image}" alt="{title}" style="max-width: 130px; max-height: 140px;" ></span>
<span>{title}</span>
</li>
{/exp:channel:entries}
</ul>
</div><!--close mini-carousel-->The behavior I’m noticing is a bit strange and I’ll try to be specific as possible. When I load the site by putting the URL in my browser, the entries load properly. When I browsing around the site, but return to the home page by clicking on the site’s main logo, which uses
<a href="{site_url}">
then the initial visible items that load in the carousel are all the same entry. By default I have the CSS set to display 6 items at a time (by setting the width on the <ul> element). In this instance, on loading the page the 6 items visible are all the same entry (items 7, 8, 9, and on are the individual items as expected). If I adjust the width of the <ul> element so that only 3 items display, then on loading the page the 3 items visible are all the same (but items 4, 5, 6 and on are individual items as expected).
The carousel is set to wrap, so that when I get to the end of the carousel it seamlessly continues and loops from the beginning. When I go through all the entries, then the original entry which was displayed 6 times, is now only displayed once. Also, if I’ve loaded the page and the 6 same items are showing, refreshing the page usually fixes the situation.
As I mentioned, when I change how many items can be viewed at once by adjusting the width of the <ul> element, it affects how many times the first entry is displayed. If the width of the <ul> will show 2 items, then the first 2 items will be the same entry, and every other one will be unique. If 3 entries are shown, the first 3 will be the same. Ditto for 5 or 6.
I’m continuing to try different things to resolve the issue, but was hoping someone here might have an idea I haven’t though of.
Thanks!