Previous and Next Templates

From WikiEducator
Jump to: navigation, search




If you look at the bottom of this page, you will notice two images (or icons)

Previous.png and Next.png .

These two icons are typically used to represent the previous page and the next page, respectively. When you see them on a page they usually behave in a special way because clicking on them will send you to a predefined page instead of the image information page (click one of the above images to go to an image information page). To act in this special way, we need to use predefined templates.

These templates are called, {{Prev}} (which is short for previous), {{Next}}, and {{PrevNext}} (which is short for previous and next) and they can be quite useful when linking a lesson plan, activity or tutorial that has several pages or subpages together.


Highlight of the insert/edit template button in the rich text editor toolbar.

Prev template

The syntax for the Prev template is similar to the pedagogical template syntax that was discussed in a previous tutorial

{{Prev | Name of previous page}}.
Template properties dialog box with the syntax for inserting the Prev template that will link to Wikieducator rich text editor tutorials.

So, for example, if the Wikieducator rich text editor tutorials page is the previous page, you can add the previous page link by entering the above syntax into the template properties dialog box as shown to the right. The dialog box is accessed using the template button on the rich text editor tool bar.

Icon present.gif
Tip: If you need help creating the template, revisit the pedagogical templates tutorial.


After clicking the OK button and previewing your work, it would appear as shown below.




Next template

The syntax for the Next template is

{{Next | Name of next page}}.

So, for example, if the Learning for contents page ( L4C ) page is the next page, the template properties dialog box (see prev section) would contain

{{Next | L4C}}
.

The template would appear in the publish view as shown below.




PrevNext template

The syntax for the PrevNext template is

{{PrevNext | Name of prev page| Name of next page}}.

So, for example, if the Wikieducator rich text editor tutorials page is the previous page and the Learning4Content page( L4C ) is the next page, the template properties dialog box (see prev section) would contain

{{PrevNext | Wikieducator rich text editor tutorials | L4C}}.

The template appear in the publish view as shown below.





Icon activity.jpg
Activity
  • Navigate to your user page by clicking on your username at the top of this page or here;
  • Navigate to your sandbox or the subpage you created in the subpages activity.
  • Edit the page
  • Using the Prev template, make the Prev icon link to "Main Page" and
  • Using the Next template, make the Next icon link to your favorite user page (For example if your favorite user page is WikiTutor, the template properties dialog would contain {{Next|User:WikiTutor}}.).
  • preview
  • add some summary text
  • click the save page button.






Icon key points.gif
Key points
  • These templates can be used more than once in a single page because you choose the page(s) that the icons link to. For example, you may have a different next link at the end of each section in a page.
  • There are some magic words that can simplify the use of these templates. They are
    • {{PAGENAME}}
    • {{BASEPAGENAME}}