[MAGNOLIA-2421] Utility class to navigate in siblings Created: 09/Oct/08 Updated: 23/Jan/13 Resolved: 26/Jan/09 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | None |
| Fix Version/s: | 4.0 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Magnolia International | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Date of First Response: | |||||||||||||
| Description |
|
Useful for templating for instance, when you need to determine if a node has siblings, is last or first, etc. |
| Comments |
| Comment by Magnolia International [ 09/Oct/08 ] |
|
committed first version |
| Comment by Magnolia International [ 13/Nov/08 ] |
|
In jstl, both values are available as "index" (0-based) and "count" (1-based). How about we do the same in SiblingsHelper ? (although I'd favor "position" instead of "count" ...) |
| Comment by Philipp Bracher [ 14/Nov/08 ] |
|
I am against it. How should someone understand the difference between index and position? Since 0 is the common start value in Java, jsp, .. no one will be surprised and if needed he just uses +1. |
| Comment by Magnolia International [ 14/Nov/08 ] |
By checking the (java)docs, just like for jstl and others. It would avoid "magic numbers" in templates, and consistency might be easier to achieve. On the other hand, I also agree with your point |
| Comment by Magnolia International [ 26/Jan/09 ] |
|
Now only exposing the index property, still as a 0-based index. |