Tmm admin pagination

From TMM Wiki
Revision as of 17:38, 28 June 2010 by TMMStephenY2 (talk | contribs) (Created page with 'tmm_admin_pagination is a function offered by NATS4 that allows you to change the way that page numbers in a list are displayed on your site. This is useful for [[NATS4 Adtoo…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

tmm_admin_pagination is a function offered by NATS4 that allows you to change the way that page numbers in a list are displayed on your site. This is useful for NATS adtools such as Free Hosted Galleries that have to be split up into multiple page displays.

When using the default template code offered by NATS, there will only be Next and Previous buttons displayed at the bottom of the page. By using the tmm_admin_pagination function, you can change it to display links at the bottom similar to this example:

FHG 1-20 of 200, <Prev 1 2 3 4 5 6 7 8 9 10 Next>

This provides a different format for viewing and displaying adtools that can be very flexible.

Editing Your Template

To use the tmm_admin_pagination function, you must edit a template and manually insert your code. You can do this by going to the Skins and Templates Admin. Click the "Advanced Skins" tab and click the "Edit Templates" action icon of the site you wish to change. Once you are at the templates list, edit the template called function_display_admin_pagination. In this template you will be able to edit attributes such as link color, using ellipses (...) at the end of your numbering, displaying in different languages, etc. Once you have edited those to your liking, you can input your code.

An example of a tmm_admin_pagination code is:

{tmm_admin_pagination start=$start count=$count total=$adcount}

Edit the $start, $count, and $adcount values with the values you would like to display.

Function Variables

The function takes three variables into account:

  • Count - How many pages/links you want to show at a time (i.e., 10 per page)
  • Start - What page number to begin counting (i.e., you will see pages 15-25 if you are on page 15)
  • Total - How many different pages/links exist in your list (this is your upper bound)

Note: An object on the page (i.e., an adtool) must use the start variable, otherwise your function will not do anything.