Added 'first' and 'last' section properties.

This commit is contained in:
andrey
2001-03-02 21:57:46 +00:00
parent f760d2aa1c
commit 86808e9cee
3 changed files with 10 additions and 6 deletions
+2
View File
@@ -491,6 +491,8 @@ function _compile_section_start($tag_args)
$output .= "{$section_props}['rownum'] = {$section_props}['index'] + 1;\n";
$output .= "{$section_props}['index_prev'] = {$section_props}['index'] - 1;\n";
$output .= "{$section_props}['index_next'] = {$section_props}['index'] + 1;\n";
$output .= "{$section_props}['first'] = ({$section_props}['index'] == 0);\n";
$output .= "{$section_props}['last'] = ({$section_props}['index'] == {$section_props}['loop']-1);\n";
$output .= "?>";