Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

section properties only available when using $smarty.section-syntax #428

Closed
eposjk opened this issue Mar 19, 2018 · 1 comment
Closed

section properties only available when using $smarty.section-syntax #428

eposjk opened this issue Mar 19, 2018 · 1 comment

Comments

@eposjk
Copy link

eposjk commented Mar 19, 2018

When you take the example 7.71 from the documentation and reduce it to

{section name=row loop=$rows}
{$rows[row.index_next]}
{/section}

row.index_next is undefined for current Smarty versions - so you get no output.
If you use $smarty.section.row.index_next instead it works:

{section name=row loop=$rows}
{$rows[$smarty.section.row.index_next]}
{/section}

Its also possible to use the short syntax and add the $smarty.section-syntax as comment - row.index_next is defined in this case:

{section name=row loop=$rows}{*$smarty.section.row.index_next*}
{$rows[row.index_next]}
{/section}

Tested and reproduced with Smarty 3.1.29, Smarty 3.1.31 and current Smarty 3.1.32-dev.
Also tested with Smarty 3.1.21 - that version does not have this problem.

@uwetews
Copy link
Contributor

uwetews commented Mar 21, 2018

The fix is now in the master branch and will later be included in 3.1.32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants