Template:GR Can't find: Difference between revisions
No edit summary |
m (optimized) |
||
Line 3: | Line 3: | ||
{{#if: {{{Location|}}}| <!-- if you want 4 generic links, send Location and Vital type --> | {{#if: {{{Location|}}}| <!-- if you want 4 generic links, send Location and Vital type --> | ||
{{#if: {{{Vital type|}}}| | {{#if: {{{Vital type|}}}| | ||
{{GR print link| | {{GR print link|Search link=[[GuidedResearch:Why Can't I Find the Record - {{{Location|}}} {{{Vital type|}}}s#Additional Online Resources|Additional online resources]]|}}<nowiki/><br> | ||
{{GR print link|Search link=[[GuidedResearch:Why Can't I Find the Record - {{{Location|}}} {{{Vital type|}}}s#Substitute Records|Substitute records]]|}}<nowiki/><br> | |||
Search link | {{GR print link|Search link=[[GuidedResearch:Why Can't I Find the Record - {{{Location|}}} {{{Vital type|}}}s#Improve searching|Improve searching]]|}}<nowiki/><br> | ||
Search link | {{GR print link|Search link=[[GuidedResearch:Why Can't I Find the Record - {{{Location|}}} {{{Vital type|}}}s#Why the record may not exist|Why the record may not exist]]}} | ||
Search link | |||
Search link | |||
}} | |||
|}} <!-- end if Vital type --> | |}} <!-- end if Vital type --> | ||
| <!-- else, location not defined and links are passed to this templates --> | | <!-- else, location not defined and links are passed to this templates --> | ||
{{ | {{#vardefine: i | 1}}{{#while: | ||
| {{{Search link {{#var: i}} |}}} | |||
| <nowiki /> | |||
|{{#ifexpr: {{#var: i }} > 1 | <br>|}} | |||
Search link | {{GR print link | ||
|Search link={{{Search link {{#var:i}}|}}}|}} | |||
{{#vardefine: i | |||
}}< | | {{#expr: {{#var: i }} + 1 }} | ||
}} | |||
}} <!-- end while loop --> | |||
}} <!-- end if Location --> | |||
<noinclude> | <noinclude> | ||
:'''Code example 1''': | :'''Code example 1''': | ||
<nowiki> | <nowiki> | ||
If you wish to use your own links in this section, use the following: | If you wish to use your own links in this section, use the following: | ||
Line 40: | Line 38: | ||
Location=Ohio| | Location=Ohio| | ||
Vital type=Birth| | Vital type=Birth| | ||
}}</nowiki>< | }}</nowiki> | ||
<templatedata> | |||
{ | |||
"params": { | |||
"Location": { | |||
"label": "Location", | |||
"description": "The location of the GuidedResearch page. ", | |||
"example": "Location=Texas", | |||
"type": "string", | |||
"default": "null", | |||
"autovalue": "null" | |||
}, | |||
"Vital type": { | |||
"label": "Vital type", | |||
"description": "The Vital type that these links will exist in (Birth, Marriage or Death)", | |||
"example": "Vital type=Marriage", | |||
"type": "string", | |||
"default": "null", | |||
"autovalue": "null" | |||
}, | |||
"Search link 1": { | |||
"label": "Search link 1", | |||
"description": "If not using the generic links for this section, you need to define the links", | |||
"example": "Search link 1=[[url to page|Name of link]]", | |||
"type": "string", | |||
"default": "null", | |||
"autovalue": "null" | |||
}, | |||
"Search link 'n'": { | |||
"label": "Search link 2, Search link 3, etc.", | |||
"description": "As many links as needed in the 'What else you can try' section", | |||
"example": "Search link 2=[[URL to page|Name of link]]", | |||
"type": "string", | |||
"default": "null", | |||
"autovalue": "null" | |||
} | |||
}, | |||
"description": "Template:GR Can't find - creates the section 'What else can you can try' on the GuidedResearch pages. If generic links are to be used for the 4 different links ('Additional Online Resources', 'Substitute records', 'Improve searching', 'Why the record may not exist'), then simply pass in the parameters 'Location' and 'Vital type'. Otherwise, pass in the detailed links to be used in 'Search link #'." | |||
} | |||
</templatedata> | |||
</noinclude> |
Revision as of 21:33, 12 October 2020
What else you can try:[edit source]
- Code example 1:
If you wish to use your own links in this section, use the following: {{GR Can't find| Number of search links=1| Search link 1=| Search link 2=| Search link 3=| <-- Currently handles up to 5 Search links (need extension:variable to change)--> }}
- Code example 2:
If you wish to use the predefined links in this section, only pass Location and Vital type: {{GR Can't find| Location=Ohio| Vital type=Birth| }}
Template:GR Can't find - creates the section 'What else can you can try' on the GuidedResearch pages. If generic links are to be used for the 4 different links ('Additional Online Resources', 'Substitute records', 'Improve searching', 'Why the record may not exist'), then simply pass in the parameters 'Location' and 'Vital type'. Otherwise, pass in the detailed links to be used in 'Search link #'.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Location | Location | The location of the GuidedResearch page.
| String | optional |
Vital type | Vital type | The Vital type that these links will exist in (Birth, Marriage or Death)
| String | optional |
Search link 1 | Search link 1 | If not using the generic links for this section, you need to define the links
| String | optional |
Search link 2, Search link 3, etc. | Search link 'n' | As many links as needed in the 'What else you can try' section
| String | optional |