[MGNLSTK-22] Teasers & Promos IDs: Start counting with 1 not with 0 Created: 12/Nov/08 Updated: 23/Jan/13 Resolved: 13/Nov/08 |
|
| Status: | Closed |
| Project: | Magnolia Standard Templating Kit (closed) |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Timo Wirth | Assignee: | Philipp Bärfuss |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | review-1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Date of First Response: |
| Description |
|
Please start with 1 instead of 0 now: Problem: better |
| Comments |
| Comment by Christian Ringele [ 12/Nov/08 ] |
|
Does this count for the <h2 id="jump0">first subheading</h2> count too? Because till now they use the same allgorithm (mgnl.siblings). |
| Comment by Magnolia International [ 12/Nov/08 ] |
|
Yeah, if we change it, we'll change it for the anchors too. I guess it makes more sense for humans anyhow.
|
| Comment by Philipp Bracher [ 13/Nov/08 ] |
|
I prefer if the caller would pass an attribute to the includeTemplate tag. This gives a certain flexibility in more complex use cases (inheritance for instance). But as a quick fix I would use the index + 1 approach. |
| Comment by Christian Ringele [ 13/Nov/08 ] |
|
If we choose the ${index + 1} approach, shall i change it on teaser&promo ID's AND the jump's for the toc, or only teasers&promos ? |
| Comment by Christian Ringele [ 13/Nov/08 ] |
|
Counting for teasers&promos starts now at 1. |
| Comment by Philipp Bracher [ 13/Nov/08 ] |
|
every indexing starts at level 1 as a normal human being would expect (except java or c developers but which are by definition no normal human beings |
| Comment by Christian Ringele [ 13/Nov/08 ] |
|
There you are absolutely right, even when our numbering system starts with 0 and not 1 and the whole world does not realize it. Ok, jumps start now wit "1" too. |
| 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 ] |
|
see my comment: http://jira.magnolia-cms.com/browse/MAGNOLIA-2421?focusedCommentId=19354#action_19354 |