Step 2b: use Pageroute

Last updated on
30 April 2025

The Pageroute module can be used to provide a user friendly wizard for creating and editing several nodes. So you can use the module to create a "route" which leads users through multiple pages, which suits very well for building a user friendly way for filling out a nodeprofile.

A pageroute consists of several pages, which have different page types. The nodefamily module comes with two page types, which are in particular useful in conjunction with nodeprofiles.

It offers two page types:

* Lonely node management page
* Lonely node display

Both page types may be used only with content types which are restricted to a maximum population of one - as it's the case for nodeprofiles. You can use the lonely node management page for providing the input/update form for the nodeprofile. The lonely node display page just shows a lonely node, so it can be used for showing the created profile node to the user.

We'll use this to create a simple pageroute, which first shows the form for inputting the data and then show the generated node.

  • First create a new route at pageroute's admin center located at admin/build/pageroute. (To have the admin center available, you need to have the pageroute_ui module enabled!). Choose a new path for it, e.g. "/nodeprofile" and proper access permissions.
  • Then create a new page of the type "Lonely node management". Give it the name "input" and set it to your nodeprofile content type. You can just leave the other settings or adapt them to fit your needs.
  • Create another page of the type "Lonely node display" and call it "view" and again set it to your nodeprofile content type. Increase the weight to a higher value, e.g. 5.
  • So now your route is built and you can test it. If you have proper access permissions there should be a new menu item for your route, which is labeled equal to the path of our route - in our example "nodeprofile". You can rename and move it by using drupal's menu module (/admin/build/menu)
  • Click on the menu item and test the route. If you prefer to have tabs on top of each page, you can enable "tab-like submit buttons" in the route's advanced settings. These buttons can be themed to look fine; unfortunately the default look isn't that nice. But having buttons on top instead of usual drupal tabs has the big advantage, if users modify their profile data and click on a tab, then their changes will be saved (instead of getting lost)!
  • Pageroute also allows the administrator to edit the profile of other users. Pageroute 5.x users go to PAGEROUTE_PATH/0/USER_ID, where PAGEROUTE_PATH has to be replaced by the proper path, in our example "nodeprofile" and USER_ID by the desired user's id.
    If you are using Pageroute 4.7.x you have to use PAGEROUTE_PATH/USER_ID.

By using pageroute and nodeprofile you can build extended nodeprofiles which exists of several content types. If you want to do that, proceed with step 3.

Help improve this page

Page status: Not set

You can: