Multiple entry tags need to be the same random entries…
Posted: 28 June 2009 10:39 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  101
Joined  04-14-2006

I have entries that contain, body text, title and an image. I want to use these to produce a jQuery rotator with selectable tabs as you can see here.

The problems I have is that I need to output a selection of 6 random entries, BUT the same 6 in 3 different places in the XHTML.

For example we have the image / css at the top of the page:

{exp:weblog:entries weblog="homeboutique"}
#rotator #fragment-{entry_id} {
    
background:transparent url({hb_image}) no-repeat top right;
}                        
{
/exp:weblog:entries}

Then the tabs and content:

<div id="rotator" class="innerGrad">                      
    <
h2>Luella's Wedding Boutique</h2>
    <ul class="ui-tabs-nav">  
        {exp:weblog:entries weblog="homeboutique"}
        <li class="ui-tabs-nav-item" id="nav-fragment-{entry_id}"><a href="#fragment-{entry_id}"><span>{title}</span></a></li>
        {/exp:weblog:entries}   
    </ul>                        
  {exp:weblog:entries weblog="homeboutique"}
    <div id="fragment-{entry_id}" class="ui-tabs-panel" style="">  
        <h2>{title}</h2>  
        {hb_summary}
        <p><a class="btn_get_started" href="#">Get Started</a> <a class="btn_learn_more" href="#">Learn More</a></p>
        <!--{exp:imgsizer:size src="{hb_image}" width="460" alt="{title}"}-->
    </div>                           
    {/exp:weblog:entries}
</div>

What is the best way to achieve this?

Profile
 
 
Posted: 01 July 2009 10:09 AM   [ Ignore ]   [ # 1 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1882
Joined  10-22-2006

I have a feeling there exists a plugin that can be used for this but for the life of me, I don’t remember which.

It would be pretty simple to make one, though (but pretty hard to find a name for it wink).

 Signature 

utilitEEs - Addons for EE

Profile
 
 
Posted: 01 July 2009 10:17 AM   [ Ignore ]   [ # 2 ]  
Professor
Avatar
RankRankRankRankRankRankRank
Total Posts:  10797
Joined  04-15-2006

Reeposition perhaps? wink

As a quick note (which I mentioned in another thread the other day) I’m fairly certain that if you have the same weblog on a page more than once with the exact same settings then even if you have the random parameter you will still get the same random entries output to the page in more than one place. Saying that though I think it might have something to do with the version of MySQL. I’m not entirely certain of the answer on that one as there was a fairly lengthy thread discussing it some time back but I don’t have the link to hand right now.

Best wishes,

Mark

 Signature 

Shopping Cart Plugin
Full list of add-ons
———————————————————-
Buy me a drink, or two if you like!!

Profile
 
 
Posted: 01 July 2009 10:21 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  29130
Joined  05-15-2004

I don’t remember, can’t Reeposition do that?

 Signature 

ExpressionEngine 2.0 Downloads | Docs | Bugtracker

“If the English language made any sense, lackadaisical would have something to do with a shortage of flowers.” (Doug Larson)

Profile
MSG
 
 
Posted: 01 July 2009 10:28 AM   [ Ignore ]   [ # 4 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1882
Joined  10-22-2006
Mark Bowen - 01 July 2009 10:17 AM

As a quick note (which I mentioned in another thread the other day) I’m fairly certain that if you have the same weblog on a page more than once with the exact same settings then even if you have the random parameter you will still get the same random entries output to the page in more than one place. Saying that though I think it might have something to do with the version of MySQL.

Normally it shouldn’t.
But i does if you enable SQL caching.
Or you could force it with tag caching.

 Signature 

utilitEEs - Addons for EE

Profile
 
 
Posted: 01 July 2009 10:47 AM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  101
Joined  04-14-2006

thanks guys - I’ll give these a go and see how I get on.

Profile
 
 
Posted: 01 July 2009 11:03 AM   [ Ignore ]   [ # 6 ]  
Professor
Avatar
RankRankRankRankRankRankRank
Total Posts:  10797
Joined  04-15-2006
silenz - 01 July 2009 10:28 AM
Mark Bowen - 01 July 2009 10:17 AM

As a quick note (which I mentioned in another thread the other day) I’m fairly certain that if you have the same weblog on a page more than once with the exact same settings then even if you have the random parameter you will still get the same random entries output to the page in more than one place. Saying that though I think it might have something to do with the version of MySQL.


But i does if you enable SQL caching.
Or you could force it with tag caching.

Ah the SQL caching may have been it although I could have sworn the other day I tried this out and didn’t have SQL caching or any kind of caching on and it still did it. Seem to remember Derek I think it was saying something about the version of MySQL although I could be mistaken on that one, the post was a while back now.

 Signature 

Shopping Cart Plugin
Full list of add-ons
———————————————————-
Buy me a drink, or two if you like!!

Profile
 
 
Posted: 01 July 2009 04:53 PM   [ Ignore ]   [ # 7 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1882
Joined  10-22-2006

In case you need it, I Do have a plugin that can be used for it and similar stuff. It’s just not publicly released, so I’d have to write some short usage instructions.

 Signature 

utilitEEs - Addons for EE

Profile
 
 
Posted: 02 July 2009 02:56 AM   [ Ignore ]   [ # 8 ]  
Professor
Avatar
RankRankRankRankRankRankRank
Total Posts:  10797
Joined  04-15-2006
silenz - 01 July 2009 04:53 PM

In case you need it, I Do have a plugin that can be used for it and similar stuff. It’s just not publicly released, so I’d have to write some short usage instructions.

You know we all love to see anything you’ve made so please do share wink

Best wishes,

Mark

 Signature 

Shopping Cart Plugin
Full list of add-ons
———————————————————-
Buy me a drink, or two if you like!!

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120152 Total Logged-in Users: 63
Total Topics: 126293 Total Anonymous Users: 30
Total Replies: 664180 Total Guests: 324
Total Posts: 790473    
Members ( View Memberlist )