Difference between revisions of "Template:Legio Header"
From Australis Ultima 30k
m |
m (→Explanation) |
||
Line 84: | Line 84: | ||
*"cyclecnt" is then checked to confirm it is a number and the default dpl error message (indicating 0 results) hasn't be returned. If this is not a number than "cyclecnt" is set to 0 | *"cyclecnt" is then checked to confirm it is a number and the default dpl error message (indicating 0 results) hasn't be returned. If this is not a number than "cyclecnt" is set to 0 | ||
* The next block is a 3 tier case statement(actually more but outcomes 1-9 resolve to the same endpoint) which evaluates against "cyclecnt": | * The next block is a 3 tier case statement(actually more but outcomes 1-9 resolve to the same endpoint) which evaluates against "cyclecnt": | ||
− | ** Case 0 - If "cyclecnt" is equal to 0 then no DPL extract is performed and simply 10 grey place holder marines are output | + | ** Case 0 - If "cyclecnt" is equal to 0 then no DPL extract is performed and simply 10 grey place holder marines are output using a while loop |
− | **Case(s) 1-9 - If "cyclecnt" is equal to 1-9 then the DPL is triggered and any remaining spaces upto 10 are filled with grey place holder marines. | + | **Case(s) 1-9 - If "cyclecnt" is equal to 1-9 then the DPL is triggered and any remaining spaces upto 10 are filled with grey place holder marines again using the while loop. |
− | ** Default - If "cyclecnt" is equal to 10 we need no placeholders and only the | + | ** Default - If "cyclecnt" is equal to 10 we need no placeholders and only the DPL extract is outputted. |
</noinclude> | </noinclude> |
Revision as of 17:06, 31 August 2014
Example Working
Explanation
- The first DPL extract returns a count of the number of pages that are going to be returned in the Query and sets the variable "cyclecnt" to this number.
- "cyclecnt" is then checked to confirm it is a number and the default dpl error message (indicating 0 results) hasn't be returned. If this is not a number than "cyclecnt" is set to 0
- The next block is a 3 tier case statement(actually more but outcomes 1-9 resolve to the same endpoint) which evaluates against "cyclecnt":
- Case 0 - If "cyclecnt" is equal to 0 then no DPL extract is performed and simply 10 grey place holder marines are output using a while loop
- Case(s) 1-9 - If "cyclecnt" is equal to 1-9 then the DPL is triggered and any remaining spaces upto 10 are filled with grey place holder marines again using the while loop.
- Default - If "cyclecnt" is equal to 10 we need no placeholders and only the DPL extract is outputted.