Seems like a marriage made in heaven, but trying to configure the arguments has melted my brain ... :P

Has anyone managed to get relativity and custom pagers to work together eg for paginating sibling nodes?

any pointers would be greatly appreciated. thanks.

CommentFileSizeAuthor
#1 chapters_by_story_VE.txt735 bytesCloudCuckoo

Comments

CloudCuckoo’s picture

Status: Closed (fixed) » Active
StatusFileSize
new735 bytes

I've been tinkering with this for the last couple of days. Here's my go at using custom pagers, views and token for paginating siblings.

In the view :

  • set the argument type as Relativity: Parent Node ID with default as page not found.
  • in the argument handling code get the parent nid of the node being viewed and set it as the argument for the view
     $args[0] = db_result(db_query('SELECT parent_nid as pid FROM {relativity} WHERE nid = %d', $args[0]));
    

In the custom pager:

  • in the 'Pager node list' section select the view and put the view argument as the placeholder token [nid].
    This passes the nid to the view which uses it to get the parent_nid and so the parent's child nodes.

View export is attached

JohnG-1’s picture

Cloudy you are a star! Thank you - this works great.

I tried setting the custom_pager settings to 'Cache the list of nodes' to see if it saved a little overhead on the database query this method adds ... but it prevented the pager from appearing where I wanted it to ... I guess the answer is leave the pager cache switched off ;)

many thanks
JohnG

CloudCuckoo’s picture

Status: Active » Fixed

You're welcome & setting to fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)
nainainai’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Active » Closed (fixed)

there are no Relativity: Parent Node ID argument type in Views 2 or it is just me.

nainainai’s picture

Status: Closed (fixed) » Active

please help

sdecabooter’s picture

Status: Active » Closed (fixed)

Hi nainainai,

Your request seems unrelated to the original topic of this issue. You might want to create a dedicated one.
But since there is no 6.x version yet of this module, there is also no integration yet with Views 2. You'll have to wait until a 6.x version is released.

Sven