|
Revision 611, 0.6 kB
(checked in by cho45, 6 years ago)
|
|
lang/scheme/bloscheme/plugins,
lang/scheme/bloscheme/plugins/paging.scm,
lang/scheme/bloscheme/template-html.scm,
lang/scheme/bloscheme/template-rdf.scm,
lang/scheme/bloscheme/template-txt.scm:
前に見せてもらったファイルをコミットしてました……
最新のをコミットしなおします
lang/scheme/bloscheme/template.scm:
削除
|
| Line | |
|---|
| 1 | |
|---|
| 2 | ; ページングフィルタ |
|---|
| 3 | ; template-hash-table に値を追加する |
|---|
| 4 | (define (paging params files) |
|---|
| 5 | (if (null? files) |
|---|
| 6 | '() |
|---|
| 7 | (let ([page-slices (slices files *entry-number*)] |
|---|
| 8 | [page-current (cgi-get-parameter "page" params |
|---|
| 9 | :default 0 |
|---|
| 10 | :convert (lambda (param) |
|---|
| 11 | (- (string->number param) 1)))]) |
|---|
| 12 | (set-template-variable 'page-slices page-slices) |
|---|
| 13 | (set-template-variable 'page-current page-current) |
|---|
| 14 | (list-ref page-slices page-current) |
|---|
| 15 | ))) |
|---|
| 16 | (add-filter last paging) |
|---|
| 17 | |
|---|