[TYPO3] < prev 2/4 next > -page navigation

joga email at welho.com
Thu Aug 31 10:14:59 CEST 2006


Hello!
I try to make page navigation menu which you can use to navigate trough 
current level pages back- and forward. Currently it works ok, but I 
couldnt figure out how to get current page number with typoscript. So I 
used external php-file, which is quite ugly. Below ### browsenavi_menu 
### -tag is working example. And under ### not finished part ### -tag is 
part where 'total count of pages' works, but how I can get correct value 
to {register:currentPageNumber} ? This TS should replace php-file. It 
also seems that my php-file runs a bit slow, so it would be nice to get 
this whole thing under typoscript. Thanks!
User should see menu like this:

< previous page 2/4 next page >

(2* is current page number and 4* is total count of pages this level)

### browsenavi_menu ###
temp.browsenavi_menu = COA
temp.browsenavi_menu {
10 = HMENU
10.special = browse
10.special {
     items = prev
     prev.fields.title = < previous page
     }
     10.1 = TMENU
     10.1.NO {
     linkWrap = |
     }

   20 = COA
   20{
     1 = PHP_SCRIPT
     1.file = fileadmin/scripts/curpage_num_and_total_pagenum.php
   }

30 = HMENU
30.special = browse
30.special {
     items = next
     next.fields.title = next page >
     }
     30.1 = TMENU
     30.1.NO {
     linkWrap = |
     }
}
}

### not finished part ###
lib.test = COA
lib.test {
    # Save the output of numRows in the registervalue: "menuNumber"
   10 = LOAD_REGISTER
   10.menuNumber.numRows {
     table = pages
     select.pidInList.data =  field:pid
   }
   # Retrieve the registervalue and display it.
   30 = TEXT
   30.dataWrap = {register:currentPageNumber} / {register:menuNumber}
}



More information about the TYPO3-english mailing list