mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
templates.js added support for !@first and !@last conditionals
This commit is contained in:
@@ -349,7 +349,9 @@
|
|||||||
|
|
||||||
if (blockInfo) {
|
if (blockInfo) {
|
||||||
checkConditional('@first', blockInfo.iterator === 0);
|
checkConditional('@first', blockInfo.iterator === 0);
|
||||||
|
checkConditional('!@first', blockInfo.iterator !== 0);
|
||||||
checkConditional('@last', blockInfo.iterator === blockInfo.total);
|
checkConditional('@last', blockInfo.iterator === blockInfo.total);
|
||||||
|
checkConditional('!@last', blockInfo.iterator !== blockInfo.total);
|
||||||
}
|
}
|
||||||
|
|
||||||
template = replace(namespace + d, data[d], template);
|
template = replace(namespace + d, data[d], template);
|
||||||
|
|||||||
Reference in New Issue
Block a user