Entries List
ExpressionEngine 1.x, ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From Laisvunas
conditionally start from the top
Support Request
Jelle Dijkstra
|
Posted: 07 February 2012 05:44 AM |
|
|
|
Hi!
I am displaying postings in a random order. I am using entries list for the previous/next navigation, which works like a dream. However, when i’m at the last (or first) item, i would like to show the first item, so by clicking on the previous/next links, my visitors can loop through all the entries. Ideally it would be something like the following (introducing some new vars here ;-))
{exp:entries_list category="{embed:thecat}" entry_id="{embed:theid}"channel="kaartjes" per_page="1"} {if previous_entry_url_title} <div class="prev">Previous <a href="{previous_entry_url_title}" title="Previous {previous_entry_title}">‘{previous_entry_title}’</a></div> {if:else} <div class="prev">Previous <a href="{last_entry_url_title}" title="Previous: {last_entry_title}">‘{last_entry_title}’</a></div> {/if} {if next_entry_url_title} <div class="next">Volgend kaartje: <a href="{next_entry_url_title}" title="Volgend kaartje: {next_entry_title}">‘{next_entry_title}’</a></div> {if:else} <div class="next">Next: <a href="{first_entry_url_title}" title="Next: {first_entry_title}">‘{first_entry_title}’</a></div> {/if} {/exp:entries_list}
|
|
|
Laisvunas
|
Posted: 07 February 2012 02:58 PM |
# 1
|
|
Developer
|
Hi,
That’s the good idea. In the next several days I will investigate how to add this feature.
|
|
|
Jelle Dijkstra
|
Posted: 09 February 2012 07:41 AM |
# 2
|
|
|
That would be great! it’s the only little bump to clear before releasing a new site…
|
|
|
Jelle Dijkstra
|
Posted: 14 February 2012 11:08 AM |
# 3
|
|
|
I fixed my issue, with a conditional and an embeed. but it would still be a good addition!
|
|
|
Laisvunas
|
Posted: 14 February 2012 02:17 PM |
# 4
|
|
Developer
|
Hi,
I added the variables such as “previous_entry_url_title”, “previous_entry_title”, “last_entry_url_title”, “last_entry_title” in the version 4.2.
If you were a little bit more patient you would spare some coding :)
|
|
|