Template:GR print link: Difference between revisions
No edit summary |
m (reverting back to November 2018 version) |
||
Line 1: | Line 1: | ||
{{#if: {{{Search link|}}}|  • {{{Search link|}}}{{#if: {{{Website|}}}|{{GR Location of link|Website={{{Website|}}}|}}|}}|}} | {{#switch:{{{Number of search links|}}}| | ||
1={{#if:{{{Search link 1|}}}|  • {{{Search link 1|}}}{{#if: {{{Website 1|}}}|{{GR Location of link|Website={{{Website 1|}}}|}}|<nowiki></nowiki>}}|}}| | |||
2={{#if:{{{Search link 1|}}}|  • {{{Search link 1|}}}{{#if: {{{Website 1|}}}|{{GR Location of link|Website={{{Website 1|}}}|}}|<nowiki></nowiki>}}|}}<br> | |||
{{#if:{{{Search link 2|}}}|  • {{{Search link 2|}}}{{#if: {{{Website 2|}}}|{{GR Location of link|Website={{{Website 2|}}}|}}|<nowiki></nowiki>}}|}}| | |||
3={{#if:{{{Search link 1|}}}|  • {{{Search link 1|}}}{{#if: {{{Website 1|}}}|{{GR Location of link|Website={{{Website 1|}}}|}}|<nowiki></nowiki>}}|}}<br> | |||
{{#if:{{{Search link 2|}}}|  • {{{Search link 2|}}}{{#if: {{{Website 2|}}}|{{GR Location of link|Website={{{Website 2|}}}}}|<nowiki></nowiki>}}|}}<br> | |||
{{#if:{{{Search link 3|}}}|  • {{{Search link 3|}}} {{#if: {{{Website 3|}}}|{{GR Location of link|Website={{{Website 3|}}}}}|<nowiki></nowiki>}}|}}| | |||
4={{#if:{{{Search link 1|}}}|  • {{{Search link 1|}}}{{#if: {{{Website 1|}}}|{{GR Location of link|Website={{{Website 1|}}}}}|<nowiki></nowiki>}}|}}<br> | |||
{{#if:{{{Search link 2|}}}|  • {{{Search link 2|}}}{{#if: {{{Website 2|}}}|{{GR Location of link|Website={{{Website 2|}}}}}|<nowiki></nowiki>}}|}}<br> | |||
{{#if:{{{Search link 3|}}}|  • {{{Search link 3|}}}{{#if: {{{Website 3|}}}|{{GR Location of link|Website={{{Website 3|}}}}}|<nowiki></nowiki>}}|}}<br> | |||
{{#if:{{{Search link 4|}}}|  • {{{Search link 4|}}}{{#if: {{{Website 4|}}}|{{GR Location of link|Website={{{Website 4|}}}}}|<nowiki></nowiki>}}|}}| | |||
5={{#if:{{{Search link 1|}}}|  • {{{Search link 1|}}}{{#if: {{{Website 1|}}}|{{GR Location of link|Website={{{Website 1|}}}}}|<nowiki></nowiki>}}|}}<br> | |||
{{#if:{{{Search link 2|}}}|  • {{{Search link 2|}}}{{#if: {{{Website 2|}}}|{{GR Location of link|Website={{{Website 2|}}}}}|<nowiki></nowiki>}}|}}<br> | |||
{{#if:{{{Search link 3|}}}|  • {{{Search link 3|}}}{{#if: {{{Website 3|}}}|{{GR Location of link|Website={{{Website 3|}}}}}|<nowiki></nowiki>}}|}}<br> | |||
{{#if:{{{Search link 4|}}}|  • {{{Search link 4|}}}{{#if: {{{Website 4|}}}|{{GR Location of link|Website={{{Website 4|}}}}}|<nowiki></nowiki>}}|}}<br> | |||
{{#if:{{{Search link 5|}}}|  • {{{Search link 5|}}}{{#if: {{{Website 5|}}}|{{GR Location of link|Website={{{Website 5|}}}}}|<nowiki></nowiki>}}|}} | |||
|<nowiki></nowiki>}} <!-- end original switch statement --> | |||
<noinclude> | <noinclude> | ||
example: | This template is called by several different templates (listed below) in order to print a link or links in a bullet lists based on the number of links passed into this template. The number of links passed in should match the number of links listed in ''Number of search link''. | ||
Note: Until a loop extension has been installed on the wiki, the most links that this template can handle is 5. Hooks are in place to check login status, however, this is not yet implemented. | |||
''List of templates that call this template:'' | |||
:Template:GuidedResearch Start Here | |||
:Template:GuidedResearch Why No Record | |||
:Template:GuidedResearch Next Step | |||
''Code example:'' | |||
<nowiki> | <nowiki> | ||
{{GR print link| | |||
Number of search links=3| <!-- this must match the number of links provided --> | |||
{{ | Search link 1=| | ||
|Search link= | Website 1=FamilySearch| | ||
Search link 2=| | |||
Website 2=Ancestry| | |||
Search link 3=| | |||
Website 3=FindMyPast| | |||
Search link 4=| | |||
Website 4=| | |||
Search link 5=| <!-- up to 5 links until extension:loops is added to wiki --> | |||
Website 5=| | |||
}}</nowiki></noinclude> | |||
<noinclude>[[Category:Guided Research]][[Category:Templates|Guided Research]]</noinclude> | |||
</ | |||
</noinclude> | |||
<noinclude>[[Category:Guided Research Templates]]</noinclude> | <noinclude>[[Category:Guided Research Templates]]</noinclude> | ||
__NOTOC__ |
Revision as of 20:19, 2 December 2020
This template is called by several different templates (listed below) in order to print a link or links in a bullet lists based on the number of links passed into this template. The number of links passed in should match the number of links listed in Number of search link.
Note: Until a loop extension has been installed on the wiki, the most links that this template can handle is 5. Hooks are in place to check login status, however, this is not yet implemented.
List of templates that call this template:
- Template:GuidedResearch Start Here
- Template:GuidedResearch Why No Record
- Template:GuidedResearch Next Step
Code example:
{{GR print link| Number of search links=3| <!-- this must match the number of links provided --> Search link 1=| Website 1=FamilySearch| Search link 2=| Website 2=Ancestry| Search link 3=| Website 3=FindMyPast| Search link 4=| Website 4=| Search link 5=| <!-- up to 5 links until extension:loops is added to wiki --> Website 5=| }}