Bureaucrats, Interface administrators, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Editors (Semantic MediaWiki), Suppressors, Administrators, trusted
11,095
edits
No edit summary |
(+ability to pass v:p and page range) |
||
Line 8: | Line 8: | ||
'''To copy''': | '''To copy''': | ||
<pre>{{BCW-page|v=|p=|text=}}</pre> | <pre> | ||
{{BCW-page|}} | |||
{{BCW-page||text=}} | |||
{{BCW-page|v=|p=}} | |||
{{BCW-page|v=|p=|text=}} | |||
</pre> | |||
{{Style P-No indent|where}} | {{Style P-No indent|where}} | ||
* '''text''' is a text to show as a link; if do not set this parameter, the text will be created automatically, displaying volume and page divided by colon, for example: BCW 3:58. | * '''text''' is a text to show as a link; if do not set this parameter, the text will be created automatically, displaying volume and page divided by colon, for example: BCW 3:58. | ||
* Usage is similar to {{t|SB-page}}. | |||
[[Category:Templates for HPB CW]] | [[Category:Templates for HPB CW]] | ||
[[Category:Templates for references]] | [[Category:Templates for references]] | ||
</noinclude><includeonly><!-- | </noinclude><includeonly>{{#vardefine:volume|{{{v|}}}}}{{#vardefine:pages|{{{p|}}}}}<!-- | ||
redefine variables if unnamed parameter is not empty; split string '3:258-61' | |||
-->{{#if: {{{1|}}}|{{#vardefine:volume|{{#explode:{{{1}}}|:|0}}}}{{#vardefine:pages|{{#explode:{{{1}}}|:|1}}}}|}}<!-- | |||
take only first page for the link (in case if passed a range: 258-61) | |||
-->{{#vardefine:page|{{#explode:{{#var:pages}}|-|0}}}}<!-- | |||
set link text; use @@ as a parameter separator | set link text; use @@ as a parameter separator | ||
-->{{#if: {{{text|}}}| {{#vardefine:link_text|{{ | -->{{#if: {{{text|}}}|{{#vardefine:link_text|{{#var:page}}@@{{{text}}}}}|{{#vardefine:link_text|{{#var:page}}}}}}<!-- | ||
make a request and design the output with template 'BCW page link' | make a request and design the output with template 'BCW page link' | ||
-->{{#ask: [[BCW volume number::{{ | -->{{#ask: [[BCW volume number::{{#var:volume}}]] [[Page number::{{#var:page}}]] | ||
|?BCW volume number = volume | |?BCW volume number = volume | ||
|? = wiki_page | |? = wiki_page |