Template:SB-page: Difference between revisions
(Created page with "<noinclude> {{Style P-No indent|This template provides the link to the page in "H. P. Blavatsky's Scrapbooks".}} '''To copy''': <pre>{{SB-page|v=|p=|text=}}</pre>...") |
mNo edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> {{Style P-No indent|This template provides the link to the page in "[[HPB-SB|H. P. Blavatsky's Scrapbooks]]".}} | <noinclude> {{Style P-No indent|This template provides the link to the page in "[[HPB-SB|H. P. Blavatsky's Scrapbooks]]".}} | ||
'''To copy''': | '''To copy''': | ||
<pre>{{SB-page|v=|p=|text=}}</pre> | <pre> | ||
{{SB-page|}} | |||
{{SB-page||text=}} | |||
{{SB-page|v=|p=}} | |||
{{SB-page|v=|p=|text=}} | |||
</pre> | |||
* '''unnamed parameter''' should be in format: '''Volume:Page''' (2:44) or '''Volume:FirstPage-LastPage''' (1:112-5) | |||
* If parameter '''text''' omitted then shown text will be created as such: '''SB 3:192'''. | |||
{| class="wikitable" | |||
|+ Examples | |||
|- | |||
! Wiki text | |||
! Result | |||
|- | |||
| <nowiki>{{SB-page|3:258-61}}</nowiki> | |||
| '''{{SB-page|3:258-61}}''' | |||
|- | |||
| <nowiki>{{SB-page|3:258-61|text=SB, vol.3, pp.258-61}}</nowiki> | |||
| '''{{SB-page|3:258-61|text=SB, vol. 3, pp. 258-61}}''' | |||
|- | |||
| <nowiki>{{SB-page|v=7|p=15}}</nowiki> | |||
| '''{{SB-page|v=7|p=15}}''' | |||
|- | |||
| <nowiki>{{SB-page|v=7|p=15|text=on page 15 of seventh volume}}</nowiki> | |||
| '''{{SB-page|v=7|p=15|text=on page 15 of seventh volume}}''' | |||
|- | |||
| <nowiki>{{SB-page|5:45-7|v=7|p=22}}</nowiki> | |||
| '''{{SB-page|5:45-7|v=7|p=22}}''' | |||
{{Style P-No indent|(unnamed parameter has higher priority)}} | |||
|} | |||
'''Related templates''': | |||
* {{t|SB add link}} – convert text in format Volume:Page into link. | |||
{{Page/doc}} | |||
[[Category:Templates for | [[Category: Templates for HPB SB]] | ||
[[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}}}}|}}<!-- | |||
}}</includeonly> | take only first page for the link (in case if passed a range: 258-61) | ||
-->{{#vardefine:page|{{#explode:{{#var:pages}}|-|0}}}}<!-- | |||
define text to display: either the one that passed, or SB v:p | |||
-->{{#if: {{{text|}}}|{{#vardefine:text|{{{text}}}}}|{{#vardefine:text|SB {{#var:volume}}:{{#var:pages}}}}}}<!-- | |||
final output | |||
-->[[HPB-SB-{{#var:volume}}-{{#var:page}}|{{#var:text}}]]</includeonly> |
Latest revision as of 04:52, 11 March 2024
This template provides the link to the page in "H. P. Blavatsky's Scrapbooks".
To copy:
{{SB-page|}} {{SB-page||text=}} {{SB-page|v=|p=}} {{SB-page|v=|p=|text=}}
- unnamed parameter should be in format: Volume:Page (2:44) or Volume:FirstPage-LastPage (1:112-5)
- If parameter text omitted then shown text will be created as such: SB 3:192.
Wiki text | Result |
---|---|
{{SB-page|3:258-61}} | SB 3:258-61 |
{{SB-page|3:258-61|text=SB, vol.3, pp.258-61}} | SB, vol. 3, pp. 258-61 |
{{SB-page|v=7|p=15}} | SB 7:15 |
{{SB-page|v=7|p=15|text=on page 15 of seventh volume}} | on page 15 of seventh volume |
{{SB-page|5:45-7|v=7|p=22}} | SB 5:45-7
(unnamed parameter has higher priority) |
Related templates:
- {{SB add link}} – convert text in format Volume:Page into link.
Pagination related templates and properties:
- {{Page}} – places book page number with bookmark (anchor); provides visual split of pages
- [[Page number]] – sets this semantic property
- {{Page continues}} – same as above, but do not set semantic property
- {{Page aside}} – places page number aside the text, sets semantic property [[Page number]]; no visual split
- {{Page aside continues}} – same as above, but without semantic property
- {{Page/doc}} – this description
Link to certain page of original text:
- {{SD-page|v=|p=|ed=|text=}} – Sectet Doctrine; uses:
- {{SD page link}} – design template
- {{SD-p-toc}} – link in table of contents
- {{IU-page|v=|p=|text=}} – Isis Unveiled; uses:
- {{IU page link}} – design template
- {{IU-p-toc}} – link in table of contents
- {{BCW-page|v=|p=|text=}} – H. P. Blavatsky Collected Writings
- {{BCW page link}} – design template
- {{SB-page|v=|p=|text=}} – H. P. Blavatsky's Scrapbooks
- {{SB add link}} – convert text in format Volume:Page into link.