Reverse Relationship and Pagination?
Posted: 20 September 2007 03:41 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  534
Joined  10-24-2005

I would like to paginate a list of reverse related entries.  Is this possible?

{exp:weblog:entries weblog="my_other_weblog" limit="1"}

    {reverse_related_entries weblog
="my_weblog" show_future_entries="yes" show_expired="yes" limit="5" paginate="bottom"}

        {title}
<br/>
        
    
{paginate}
        
<p>Page {current_page} of {total_pages} pages {pagination_links}</p>
    
{/paginate}    
    

    {
/reverse_related_entries}
        
    {
/exp:weblog:entries}

Unfortunately, this doesn’t work.  I’ve tried several variations with no luck either.  Anyone have any clue?  Thank you for the help!

Profile
 
 
Posted: 23 September 2007 01:35 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  534
Joined  10-24-2005

Anyone out there with an answer willing to assist?  cheese

Profile
 
 
Posted: 26 September 2007 07:30 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  173
Joined  03-07-2007

From the docs i get that pagination is limited to weblog entries, comments and the query-module (not sure, but i don’t see it mentioned at reverse or related entries). An alternative method would be a query. (see also http://expressionengine.com/wiki/Relationships:_Under_the_Hood )

Profile
 
 
Posted: 26 September 2007 01:56 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  173
Joined  03-07-2007

Maybe the technical support forum might be a better place to query about this (pagination of reversed related entries)

Profile
 
 
Posted: 29 September 2007 08:56 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  165
Joined  09-29-2007

i’m surprised that pagination isn’t working for you as in the documentation it says:

“Nearly anything that is available in the weblog entries tags can be shown as reverse related data.” 

i suppose the “nearly” is important in this case.  you could try something like this, though i haven’t tested it out.


{assign_variable:my_entry_ids=""}


{exp
:weblog:entries weblog="my_other_weblog" limit="1"}

    {reverse_related_entries weblog
="my_weblog" show_future_entries="yes" show_expired="yes"}

        {my_entry_ids
="{my_entry_ids}|{entry_id}"}    
    
    {
/reverse_related_entries}
        
{
/exp:weblog:entries}


{exp
:weblog:entries weblog="my_other_weblog" entry_id="{my_entry_ids}" limit="5" paginate="bottom"}

    {title}
<br/>
        
    
{paginate}
        
<p>Page {current_page} of {total_pages} pages {pagination_links}</p>
    
{/paginate}    
    
{
/exp:weblog:entries}


i have a suspicion that reassigning the variable my_entry_ids may cause problems but its worth a shot.

 Signature 

* Get the Sitemap Module and improve your site’s SEO

More Add-ons: Multi Language, iWebApp, Stand-Alone Image Editor, Landing Page, LogMeIn, Loop Plugin, Session Variables

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 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65026 Total Logged-in Users: 41
Total Topics: 82116 Total Anonymous Users: 18
Total Replies: 441309 Total Guests: 195
Total Posts: 523425    
Members ( View Memberlist )
Newest Members:  meenoiYang.JianuoioitsukiNathan HammondalexcigadamstaneckiLucas Mayscybermilltstitt