Template:CyzCreateProperties: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 1: | Line 1: | ||
{{#vardefine:aprefix|{{{2}}}}}{{#varexists:ComChptNum||{{#vardefine:ComChptNum|{{{1}}}}}}}{{# | {{#vardefine:CyzComQtLen|250}} | ||
{{#vardefine:aprefix|{{{2}}}}} | |||
{{#varexists:ComChptNum||{{#vardefine:ComChptNum|{{{1}}}}}}} | |||
{{! Create a compound variable name }} | |||
{{#vardefine:compoundVar|{{#var:aprefix}}{{#var:ComChptNum}}}} | |||
{{! Check if the compound variable exists and increment or initialize it }} | |||
{{#varexists:{{#var:compoundVar}}| | |||
{{#vardefine:{{#var:compoundVar}}|{{#expr:{{#var:{{#var:compoundVar}}}}+1}}}}| | |||
{{#vardefine:{{#var:compoundVar}}|1}} | |||
}} | |||
{{! Get the current value of the compound variable }} | |||
{{#vardefine:compoundVarValue|{{#var:{{#var:compoundVar}}}}}} | |||
{{! Define the span ID }} | |||
{{#vardefine:SbQ|CyzComChpt{{#var:ComChptNum}}-{{#var:aprefix}}{{#var:compoundVarValue}}}} | |||
<span id="{{#var:SbQ}}"></span> | |||
{{! Conditional blockquote opening }} | |||
{{#ifeq:{{{1}}}|1| | |||
<blockquote>| | |||
{{#ifexpr:{{#len:{{{3}}}}} > {{#var:CyzComQtLen}}| | |||
<blockquote>| | |||
}} | |||
}} | |||
{{CyzCommTxt|{{{3}}}}} | |||
{{! Conditional blockquote closing }} | |||
{{#ifeq:{{{1}}}|1| | |||
</blockquote>| | |||
{{#ifexpr:{{#len:{{{3}}}}} > {{#var:CyzComQtLen}}| | |||
</blockquote>| | |||
}} | |||
}} | |||
{{! Semantic annotations }} | |||
{{#set:has quote from {{{1}}}={{{3}}} | {{#var:SbQ}}={{{3}}}}} | |||
{{#ifeq:{{#var:compoundVarValue}}|1| | |||
{{#set:has quote from tib text={{{1}}}}}| | |||
}} | |||
<noinclude>{{CyzTmplCategory}}</noinclude> |
Revision as of 13:57, 11 March 2025
Template:! Create a compound variable name
Template:! Check if the compound variable exists and increment or initialize it
Template:! Get the current value of the compound variable
Template:! Conditional blockquote opening
{{{3}}}
Template:! Conditional blockquote closing
Template:! Semantic annotations
<ul><li>"has quote from {{{1}}}" contains a listed "{" character as part of the property label and has therefore been classified as invalid.</li> <!--br--><li>"CyzComChpt{{{1}}}-{{{2}}}1" contains a listed "{" character as part of the property label and has therefore been classified as invalid.</li></ul>