Closed (fixed)
Project:
Flippy - Previous / Next pager for Nodes
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2011 at 08:51 UTC
Updated:
13 Mar 2012 at 21:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
Aurochs commentedFully support that. Would be great to have possibility to customize the links with titles and fields from next nodes.
Would be awesome to have similar to this Russian MSN page: http://goo.gl/5q3pt
Comment #2
dooug commentedYou can load the nodes the get the node object to print the titles (or whatever else from the node).
Here is my example from my custom
flippy.tpl.php:(my example uses the
$listvariable for the nids, to use$prev, etc.. see: this issueHowever, this doesn't seem very efficient to load these. Maybe we should patch the module to include these titles in a variable array on this tpl?
Comment #3
dooug commentedAttached is a patch to the flippy module that includes the node titles in the flippy pager variables in the
flippy.tpl.php.It also includes my patch that includes the template variables: #1299436: Undefined variables $next, $prev, $current etc.
Comment #4
dooug commentedLatest patch attached includes all my changes, including fixing the
flippy_preprocess_nodefunction to pass-by-reference the$varsvariable.Comment #5
Aurochs commentedGreat - many thanks!
Comment #6
mgladding commentedI tried out the patch, but instead of seeing the node titles, just get "Array" as the output. Any ideas?
Comment #7
dooug commentedThe patch changes the flippy.tpl.php so the
$current, $next, $prevetc are arrays with keys 'nid' and 'title'.For instance,
$current['title']should give you the current title.Comment #8
mgladding commentedThanks!
So now, how would I go about making said title a link to the content?
Comment #9
Aurochs commented<a href="node/<?php print $next['nid']; ?>"> <?php print $next['title']; ?></a>Just a suggestion i did not try it yet...
Comment #10
eaton commentedThe ability to show the title of each node as the link name is in the current dev release. I'll look through this patch and see if there are other fixes, but for the moment I'm marking the original issue as fixed. Thanks!