Summary: | Should we prefer `loop.first` and `loop.last` over calling `variable.count` to reduce our DB hits | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Templates | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | dcook, jonathan.druart, kyle, nick, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29859 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23991 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Martin Renvoize (ashimema)
2022-02-03 15:05:13 UTC
Doh.. it's wouldn'y be 'thing.first' and 'thing.last'.. it would be the special variables.. 'loop.first' and 'loop.last' in the above example. Sounds reasonable to me Sometimes we need to know if there is are least 1 row, to display a title for instance, or actions (check/uncheck all) at the top of the table. We will then end up with 2 patterns. Not a big deal, but worst noting it. Maybe better to have a TT var defined at the top of the template then reused all along? |