Plugin

Developer
Supported

Entries List

ExpressionEngine 1.x, ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Laisvunas

     

You must be logged in to post.

Entry Series Help

General

Stephen
Stephen

Hello,

I just purchased your plug-in with the hopes it will offer my solution. I can’t get it to do what I’m looking for though.

I’m simply trying to set up a prev/next list for entries with random entry_ids. The parameter “entry_series” seems to be what I need, but I can’t get it to operate. I’m newer to EE, so there may be some basic EE stuff I’m screwing up.

Here’s what I have:

<div id="contentWrapper">
 
{exp:channel:entries channel="main_pages" status="open|draft|hidden" disable="pagination|member_data|categories|category_fields"}
  {exp
:allow_eecode embed="y"}
   
<div id="content">
     <
div class="content-primary">
      <
div class="lesson_title">
       <
h3>{subtitle}</h3>
       <
h1>{title}</h1>
      </
div>
      
      <
div id="next-top">
       <
div class="next">
        
{exp:entries_list channel="main_pages" entry_series="57|58|59|21|33"}
         
<>Next </a>
        
{/exp:entries_list}
       
</div>
      </
div>
      
      <
div class="lesson_content_top">
       
{main_body}
      
</div>
    
     </
div> <!-- end content-primary -->
    
    </
div> <!-- end content -->
    
   </
div> <!-- end contentWrapper -->

  
{/exp:allow_eecode}
 {
/exp:channel:entries}
 
</div><!-- /#main --> 

Could you help?

Laisvunas
# 1
Developer
Laisvunas

Hi,

1) Why do you wrap everything with exp:channel:entries tag?

2) what role the tag exp:allow_eecode plays in you code?

3) how do you determine the entry in relation to which certain entry should be considered “next” and certain another entry should be considered “previous” ?

Stephen
# 2
Stephen

1) That’s my basic template. I close the tags, of course, when I need to and utilize other tags. I’m guessing it needs to be closed for this based on your question. I just closed them before and {exp:entries_list} and I’m getting better results.

2) Yeah, should’ve deleted that.

3) I have a site map I need to follow. Users should be able to just click “next” to go the next page/entry.

I’ve modified the code to this:

<div id="contentWrapper">
 
{exp:channel:entries channel="main_pages" status="open|draft|hidden" disable="pagination|member_data|categories|category_fields"}
   
<div id="content">
     <
div class="content-primary">
      <
div class="lesson_title">
       <
h3>{subtitle}</h3>
       <
h1>{title}</h1>
      </
div>
  
{/exp:channel:entries}
      
<div id="next-top">
       <
div class="next">
        
{exp:entries_list channel="main_pages" entry_series="57|58|59|21|33"}
         
<a href="{url_title}">Next</a>
        
{/exp:entries_list}
       
</div>
      </
div>
 
{exp:channel:entries channel="main_pages" status="open|draft|hidden" disable="pagination|member_data|categories|category_fields"}
      
<div class="lesson_content_top">
       
{main_body}
      
</div>
    
     </
div> <!-- end content-primary -->
    
    </
div> <!-- end content -->
    
   </
div> <!-- end contentWrapper -->

 
{/exp:channel:entries}
 
</div><!-- /#main --> 

It’s working for what it’s supposed to, I believe, but this isn’t what I looking for. I just want to organize customized set of entries to have pagination. Is this possible?

Stephen
# 3
Stephen

Here’s another explanation of my problem and goal:
I’ve got a site that will have about 100 or so entries in one channel. The entries all need to be connected through next/prev links. The pagination for this site seems to be unorthodox because the entry_id and entry_dates are not in order. They changed the site map on me. It seems I need to create a custom order to paginate through. I’m trying to figure the easiest way to code the pagination links so I can use the same template for each entry without having too many conditionals, etc.

Your plug-in seemed like it could work, but now I’m not sure.

Stephen
# 4
Stephen

So, I’m getting closer. Currently have:

{exp:entries_list channel="main_pages" entry_series="32|57|58|59|21|33|60|64" per_page="1"}
 
<a href="{next_entry_url_title}">{next_entry_title}</a><br />
{/exp:entries_list} 

But as you probably know, no matter what entry I am on, the “next_entry_id” is always entry_id 57. When I’m on entry id 57, I want the “next_entry_id” to be 58 and so on. How do I make that happen?

 

Stephen
# 5
Stephen

Got it working.

Within my exp:channel:entries tag I have this:

<div id="next-top">
   
{exp:entries_list channel="main_pages" entry_id="{entry_id}" entry_series="32|57|58|59|21|33|60|64" per_page="1"}
 
<div class="back">
  <
a href="{previous_entry_url_title}"><< Atrás</a>
 </
div>
 <
div class="next">
  <
a href="{next_entry_url_title}">Próximo >></a>
 </
div
   
{/exp:entries_list}
</div
Laisvunas
# 6
Developer
Laisvunas

Hi Stephen,

Glad that you got it working. Don’t hesitate to ask again if you encounter other issues.

Stephen
# 7
Stephen

Hello again,
I hadn’t checked the site in a few days and missed that I have this error:

A PHP Error was encountered
Severity
Notice
Message
Undefined offset0
Filename
entries_list/pi.entries_list.php
Line Number
900

A PHP Error was encountered
Severity
Notice
Message
Undefined offset0
Filename
entries_list/pi.entries_list.php
Line Number
900

A PHP Error was encountered
Severity
Warning
Message
Cannot modify header information headers already sent by (output started at /.../public_html/manager/codeigniter/system/core/Exceptions.php:170)
Filenamecore/Common.php
Line Number
405 

Do you have a fix for this? Thanks!


UPDATE:
I notice this happens on pages that have the entries_list tag in the template but are not listed? Something like that. Not all pages are showing it.

Laisvunas
# 8
Developer
Laisvunas

Hi Stephen,

Please, post here that part of the template code which contains exp:entries_list tag of the page which outputs PHP error.

Also URL of that page is needed. Is the template index template of the template group? Or maybe it is the site index?

Stephen
# 9
Stephen

My code is…

<div id="contentWrapper">
 
{exp:channel:entries channel="main_pages" status="open|draft|hidden" disable="pagination|member_data|categories|category_fields"}
   
<div id="content">

     <
div class="lesson_title"><h1>{title}</h1></div>

     <
div id="next-top">
       <
div class="next">
         
{exp:entries_list channel="main_pages" entry_id="{entry_id}" per_page="1" entry_series="32|57|58|59|21|33|60" }
           
<a href="{next_entry_url_title}">Próximo >></a>
         
{/exp:entries_list}
       
</div>
     </
div>

     <
div class="lesson_content_top">
       
{main_body}
     
</div>
    
    </
div> <!-- end content -->
    
   </
div> <!-- end contentWrapper -->

 
{/exp:channel:entries} 

The page that displays the error is entry_id=13 (home page), which is not in the list, but uses the same template (only using one template for this site). The template is the index template for its group.


The site is off right now. I sent you admin access via email.

Laisvunas
# 10
Developer
Laisvunas

Hi Stephen,

I fixed the issue.  Install the version 4.1.1 and tell me if something goes wrong.

Stephen
# 11
Stephen

Thank you so much. The problem is fixed with the new release.