This module provides a Previous/Next type of navigation for node entity type. It integrates with Weight module.

To use it simply:

  1. Add Previous/Next Navigation block to any region (if you are using Display Suite, you may add Previous/Next Navigation field inside Content Type's Manage Display tab);
  2. Go to Previous/Next Navigation at Configuration -> System -> Previous/Next Navigation Settings (admin/config/system/previous_next_navigation) to enable and set up ordering direction for navigation per Content Type.

Now, navigate to this type of content (e.g. http://mysite.com/node/2) and you should find Previous/Next pager on the page (of course it will happen only in case there're more than 1 node of this type created).

In future I have plan to:
- add more entity types like terms, comments etc.
- make entities ordering more flexible (more fields and options)

Here's a list of modules which does similar thing: https://drupal.org/node/1276920. None of them have Weight module support, display suite support, different entities support (which I plan about to do).

Here is project's page: https://drupal.org/sandbox/nostop8/2111653

Comments

klausi’s picture

Status: Active » Needs review

I guess this needs review? See https://drupal.org/node/532400

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxnostop82111653git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

nostop8’s picture

Status: Needs work » Needs review

Hi there!
I made some .info and .module fixes according to http://pareview.sh. Please, review it. Thanks a lot!

Anonymous’s picture

Hi, There are still 71 erros, a lot due to indentation,

http://pareview.sh/pareview/httpgitdrupalorgsandboxnostop82111653git

Anonymous’s picture

Status: Needs review » Needs work
nostop8’s picture

Status: Needs work » Needs review

Fixed almost all formatting errors... only these left: "additional spaces"... hell knows what it should be... I've tried 2, 4 and 6 and every time it says that it needs 2 more additional spaces :)

nostop8’s picture

Also, I've added
- back-end for Node ordering direction (by nid and optionally by weight).
- display suite support

genjohnson’s picture

Status: Needs review » Needs work

There are still many indentation errors. Each indentation should be 2 spaces. You may find the Indenting and Whitespace section of the Drupal coding standards helpful.

It looks like you're working on the master branch. The project should be using a major version branch. See https://drupal.org/empty-git-master for steps to move from master.

Adding a README.txt file would be helpful.

Anonymous’s picture

I've got this tip earlier so I'm passing in on to you.

You should work on a release branch ( 7.x-1.x ) and not the master

and about the return comments:

it should look like this: Ex:

/*
* @return string
* __returns the new string
*/

See how many whitespaces(the 2 underscores) there are and apply to your code.

Greetings
/K

nostop8’s picture

Status: Needs work » Needs review

Hi Guys!

genjohnson, thanks for the branch tip. I did not know that it should be changed on the project page. Now it is done. As for the errors. Come on! "Whitespace found at end of line" - is this really an error? it seems a bit funny... anyway, I've fixed it... now the list of my commits is really full of indentation and white space fixes :)

kentoro, thanks for the illustration! Turns out my IDE was doing 1 space indentation there first time. I did not notice it. Now it is fixed too.

BTW, I've noticed that even core modules are full of these errors. I'm not talking about contributed modules :)

Could somebody give a feedback on the module itself (not white spaces "errors"), please? Thanks!

nostop8’s picture

Issue summary: View changes

sandbox projects page added

dubcanada’s picture

It looks fine to me besides formatting issues. I don't see anything wrong.

saitanay’s picture

Status: Needs review » Needs work

Hi nostop8,

Here are my observations after trying the module.

Duplicate Effort

The Flippy project does the same. https://drupal.org/project/flippy . Could you help me understand how this project differs from Flippy or is better than Flippy.

Missing Dependencies

When I enabled the module and the corresponding blocks, I got a WSOD on all pages with the block. PHP logs showed
PHP Fatal error: Call to undefined function entity_load_single()
Looks like this module requires entity api module to be enabled as it uses some of its functions - https://drupal.org/project/entity
The dependency is not defined in the .info file

PHP Notices

Using PHP v5.4.4 , shows the below notices on the settings page admin/config/system/previous_next_navigation

Notice: Undefined index: node in previous_next_navigation_settings() (line 38 of /Applications/MAMP/htdocs/perflife/sites/all/modules/previous_next_navigation/previous_next_navigation.admin.inc).
Notice: Undefined index: node in previous_next_navigation_settings() (line 47 of /Applications/MAMP/htdocs/perflife/sites/all/modules/previous_next_navigation/previous_next_navigation.admin.inc).
Notice: Undefined index: node in previous_next_navigation_settings() (line 38 of /Applications/MAMP/htdocs/perflife/sites/all/modules/previous_next_navigation/previous_next_navigation.admin.inc).
Notice: Undefined index: node in previous_next_navigation_settings() (line 47 of /Applications/MAMP/htdocs/perflife/sites/all/modules/previous_next_navigation/previous_next_navigation.admin.inc).
Notice: Undefined index: node in previous_next_navigation_settings() (line 38 of /Applications/MAMP/htdocs/perflife/sites/all/modules/previous_next_navigation/previous_next_navigation.admin.inc).
Notice: Undefined index: node in previous_next_navigation_settings() (line 47 of /Applications/MAMP/htdocs/perflife/sites/all/modules/previous_next_navigation/previous_next_navigation.admin.inc).

Settings Form in wrong place

The settings form sits in the "System" section @ admin/config/system/previous_next_navigation along with level configuation.
Move it to a different appropriate Section

Package

The current package name in the .info file is "Group" which is very ambiguous.
Looks like the sample code / placeholder should be updated with an appropriate group name.

Better Labels

The config page used terms like "nid" "asc" "dsc" etc
Will be better if more non-technical labels and expanded words are used not to confuse the end user

More Configurable

Should be good if the user is allowed to configure the Prev/Next link labels rather than hard-coding them to "Previous" and "Next"

Best
Tanay

saitanay’s picture

Issue summary: View changes

Description changes

PA robot’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.