Changes

Jump to navigation Jump to search
no edit summary
* <code><nowiki>|propertyvalue=</nowiki></code> - the string value of the property; this is to be passed as a parameter, since not all properties are stored and, thus, not all properties are retrievable.
* <code><nowiki>|requiredwordcount=</nowiki></code> - the minimal number of words to qualify as 100% complete.
* <code><nowiki>|returnvalue=</nowiki></code> - if nonempty, the calculated value is returned.
</noinclude><includeonly><!--
-->{{#vardefine: varCR|0}}<!-- start from 0 as the completion rate
-->{{#ifexpr: {{#len: {{{propertyvalue|}}} }} > ({{{requiredwordcount|1}}} * 6)<!--
-->|<!-- if: store the value as complete
-->{{#setvardefine: CR_{{{propertyname}}}=varCR|100}}<!--
--><!--
-->|<!-- else: store the percentage
-->{{#setvardefine: CR_{{{propertyname}}}=varCR|{{#expr: (100/({{{requiredwordcount|1}}} * 6) * {{#len: {{{propertyvalue|}}} }} ) round 0}} }}<!--
--><!--
-->}}<!-- if length is greater than required word count
--><!-- store the value
-->{{#set: CR_{{{propertyname}}}={{#var: varCR}} }}<!--
--><!-- return the value if necessary
-->{{#if: {{{returnvalue|}}}|{{#var: varCR}}|}}<!--
--></includeonly>

Navigation menu