ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to stop repeating entries on same page?

August 10, 2011 5:38pm

Subscribe [3]
  • #1 / Aug 10, 2011 5:38pm

    *Mark*

    60 posts

    Hello

    I’m creating some dynamic text using EE entries which you can see here:

    http://inspr.in/9C6X

    How would I stop any one entry appearing twice or more?

    Code for each letter:

    <div class="avatar-type-hug">
        
    {exp:channel:entries channel="faces" orderby="random" dynamic="no" sort="asc" limit="5" status="open"}
    <div class="avatar"><a href="http://{title_permalink}">{upload_face:thumb_url}</a></div>
    {/exp:channel:entries}
            
    <div class="avatar-spacer"></div><div class="avatar-spacer"></div><div class="avatar-spacer"></div>
    
    
    {exp:channel:entries channel="faces" orderby="random" dynamic="no" sort="asc" limit="1" status="open"}
    <div class="avatar"><a href="http://{title_permalink}">{upload_face:thumb_url}</a></div>
    {/exp:channel:entries}
            
    <div class="avatar-spacer"></div><div class="avatar-spacer"></div><div class="avatar-spacer"></div>
    
    {exp:channel:entries channel="faces" orderby="random" dynamic="no" sort="asc" limit="1" status="open"}
    <div class="avatar"><a href="http://{title_permalink}">{upload_face:thumb_url}</a></div>
    {/exp:channel:entries}
    
    <div class="avatar-spacer"></div><div class="avatar-spacer"></div><div class="avatar-spacer"></div>
    
    {exp:channel:entries channel="faces" orderby="random" dynamic="no" sort="asc" limit="4" status="open"}
    <div class="avatar"><a href="http://{title_permalink}">{upload_face:thumb_url}</a></div>
    {/exp:channel:entries}    
            
    </div><!--end avatar-type-hug-->

    Many thanks 😊

  • #2 / Aug 10, 2011 6:32pm

    glenndavisgroup

    436 posts

    Not sure if this is the right solution but would the entry_id_from=“1” and entry_id_to=“10” not work? You can specify the range for each channel entries tag pair which will only display those images you specify in the range.

    Mike

  • #3 / Aug 11, 2011 5:49am

    John Henry Donovan

    12339 posts

    Hi Mike,
    Interesting experiment 😊. Pretty resource intensive though. Make use of your disable parameter to limit some of those queries.

    Mike’s seems like a good solution. Would that work for you?

    Moving to Community Help as more appropriate there

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases