|
|
(17 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| | {{#if: {{{Search link|}}}|  • {{{Search link|}}}{{#if: {{{Website|}}}|{{GR Location of link|Website={{{Website|}}}|}}|}}|}} |
| <noinclude> | | <noinclude> |
| ''Code example:''
| | example: |
| <nowiki> | | <nowiki> |
| {{GR print link|
| | This template prints one link at a time, it is called from several different GR templates. |
| 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=|
| |
| }}</nowiki></noinclude>
| |
| {{#switch:{{{Number of search links|}}}|
| |
| 1={{#if:{{{Search link 1|}}}|  • {{{Search link 1|}}}{{GR Location of link|Website={{{Website 1|}}}|}}|<nowiki></nowiki>}}|
| |
| 2={{#if:{{{Search link 1|}}}|  • {{{Search link 1|}}}{{GR Location of link|Website={{{Website 1|}}}|}}<nowiki></nowiki>}}<br>
| |
| {{#if:{{{Search link 2|}}}|  • {{{Search link 2|}}}{{GR Location of link|Website={{{Website 2|}}}|}}|<nowiki></nowiki>}}|
| |
| 3={{#if:{{{Search link 1|}}}|  • {{{Search link 1|}}}{{GR Location of link|Website={{{Website 1|}}}|}}|<nowiki></nowiki>}}<br>
| |
| {{#if:{{{Search link 2|}}}|  • {{{Search link 2|}}}{{GR Location of link|Website={{{Website 2|}}}}}|<nowiki></nowiki>}}<br>
| |
| {{#if:{{{Search link 3|}}}|  • {{{Search link 3|}}} at {{GR Location of link|Website={{{Website 3|}}}}}|<nowiki></nowiki>}}|
| |
| 4={{#if:{{{Search link 1|}}}|  • {{{Search link 1|}}}{{GR Location of link|Website={{{Website 1|}}}}}|<nowiki></nowiki>}}<br>
| |
| {{#if:{{{Search link 2|}}}|  • {{{Search link 2|}}}{{GR Location of link|Website={{{Website 2|}}}}}|<nowiki></nowiki>}}<br>
| |
| {{#if:{{{Search link 3|}}}|  • {{{Search link 3|}}}{{GR Location of link|Website={{{Website 3|}}}}}|<nowiki></nowiki>}}<br>
| |
| {{#if:{{{Search link 4|}}}|  • {{{Search link 4|}}}{{GR Location of link|Website={{{Website 4|}}}|{{{Login 4|}}}}}|<nowiki></nowiki>}}|
| |
| 5={{#if:{{{Search link 1|}}}|  • {{{Search link 1|}}}{{GR Location of link|Website={{{Website 1|}}}}}|<nowiki></nowiki>}}<br>
| |
| {{#if:{{{Search link 2|}}}|  • {{{Search link 2|}}}{{GR Location of link|Website={{{Website 2|}}}}}|<nowiki></nowiki>}}<br>
| |
| {{#if:{{{Search link 3|}}}|  • {{{Search link 3|}}}{{GR Location of link|Website={{{Website 3|}}}}}|<nowiki></nowiki>}}<br>
| |
| {{#if:{{{Search link 4|}}}|  • {{{Search link 4|}}}{{GR Location of link|Website={{{Website 4|}}}|{{{Login 4|}}}}}|<nowiki></nowiki>}}<br>
| |
| {{#if:{{{Search link 5|}}}|  • {{{Search link 5|}}}{{GR Location of link|Website={{{Website 5|}}}}}|<nowiki></nowiki>}}
| |
| |<nowiki></nowiki>}} <!-- end original switch statement -->
| |
| <noinclude>
| |
| 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:'' | | {{Print link |
| :Template:GuidedResearch Start Here | | |Search link= |
| :Template:GuidedResearch Why No Record | | |Website= |
| :Template:GuidedResearch Next Step | | }}</nowiki> |
| <br> | | <templatedata> |
| | { |
| | "params": { |
| | "Search link": { |
| | "label": "Search link", |
| | "description": "URL link", |
| | "example": "Search link=1600s-1900s: '''<u>[https://www.familysearch.org/search/record/results?count=20&offset=0&query=%2Brecord_country%3AItaly%20%2Brecord_type%3A2 Italy Death Collections</u>''']", |
| | "type": "string", |
| | "default": "null", |
| | "autovalue": "null", |
| | "required": true |
| | }, |
| | "Website": { |
| | "label": "Website", |
| | "description": "The website that the 'Search link' is located", |
| | "example": "Website=Ancestry (FamilySearch, Ancestry, Findmypast, etc)", |
| | "type": "string", |
| | "default": "null", |
| | "autovalue": "null" |
| | } |
| | }, |
| | "description": "Template:GR Print link - This template will print out a single link found on a GuidedResearch page. " |
| | } |
| | </templatedata> |
| </noinclude> | | </noinclude> |
| | <noinclude>[[Category:Guided Research Templates]]</noinclude> |