Template:GR Start here: Difference between revisions

From FamilySearch Wiki
(Created page with "<noinclude> :'''Code example''': <nowiki> {{GuidedResearch Start Here| Vital type=Birth| Number of search links=1| Search link 1=| Website 1=FamilySearch| Search...")
 
m (Text replacement - "FindMyPast" to "Findmypast")
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
{{#if: {{{Vital type|}}}| <!-- create heading.  Either "Start a 'Vital type' index", or 'Search an index' -->
== {{ucfirst:{{{Vital type}}} }} - Where can I find {{lc:{{{Vital type}}} }} records? ==
|
== Search an index ==
|}}
=== Start here: ===
{{#vardefine: i | 1}}{{#while: <!-- loop through the 'Search link #' and print out. -->
| {{{Search link {{#var: i}} |}}}
|<nowiki/>
{{GR print link
|Search link={{{Search link {{#var:i}}|}}}
|Website={{{Website {{#var:i}}|}}}|}}<br>
{{#vardefine: i
  | {{#expr: {{#var: i }} + 1 }}  <!-- increase var:i by 1 -->
}}
}}<noinclude>
:'''Code example''':  
:'''Code example''':  
  <nowiki>
  <nowiki>
{{GuidedResearch Start Here|
The following is an example of a call to the template.  You can have as many links as desired, just make sure to start at 1 and do not skip any numbers in your list. (don't have 1, 2, 4, 6 - only 1 and 2 will be output.) See below for definitions of input values.
  Vital type=Birth|
{{GR start here
  Number of search links=1|  
|Vital=
  Search link 1=|
|Search link 1=
  Website 1=FamilySearch|
|Website 1=
  Search link 2=|  
|Search link 2=
  Website 2=Ancestry|
|Website 2=
  Search link 3=|
}}</nowiki>
  Website 3=FindMyPast|  <-- Currently handling up to 5 Search links -->
<templatedata>
}}
{
</nowiki>
"params": {
</noinclude>
"Vital type": {
{{#if: {{{Vital type|}}}|
"label": "Vital type",
== Search a {{lc:{{{Vital type}}} }} index ==
"description": "Vital type - defines the header of the dropdown section on the Guided Research page. Current recommended vital types are Birth, Marriage and Death.",
{{plural:{{{Number of search links}}}-1|Search the following database.|For best results, search the following databases in the order listed below.|}}
"example": "Vital type=Birth",
=== Start here: ===
"type": "string",
{{GR print link|
"default": "null",
Number of search links={{{Number of search links|}}}|
"autovalue": "null",
Search link 1={{{Search link 1|}}}|
"required": false
Website 1={{{Website 1|}}}|
},
Search link 2={{{Search link 2|}}}|
"Search link 1": {
Website 2={{{Website 2|}}}|
"label": "Search link 1",
Search link 3={{{Search link 3|}}}|
"description": "entire string containing the link to be printed in the 'Start here' section.  'Search link' will be output exactly as entered.",
Website 3={{{Website 3|}}}|
"example": "Search link 1=1500s-1900s: '''<u>[https://www.familysearch.org/search/record/results?count=20&offset=0&query=%2Brecord_country%3AItaly%20%2Brecord_type%3A1 Italy Marriage Collections]</u>'''",
Search link 4={{{Search link 4|}}}|
"type": "string",
Website 4={{{Website 4|}}}|
"default": "null",
Search link 5={{{Search link 5|}}}|}}
"autovalue": "null",
Website 5={{{Website 5|}}}|
"required": true
|<nowiki></nowiki>}}  <!-- end original if statement -->__NOTOC__<noinclude>
},
 
"Search link 'n'": {
== Code Example ==
"label": "Search link 2; Search link 3; ....",
Here's an example of code which can be used to call this template.
"description": "You can have as many Search links as needed to be printed in the 'Start here' section",
:'''example''':  
"example": "Search link 2=1500s-1900s: '''<u>[https://www.familysearch.org/search/record/results?count=20&offset=0&query=%2Brecord_country%3AItaly%20%2Brecord_type%3A1 Italy Marriage Collections]</u>'''",
<nowiki>
"type": "string",
{{GuidedResearch Start Here|
"default": "null",
  Vital type=Birth|
"autovalue": "null"
  Number of search links=1|
},
  Search link 1=|
"Website 1, Website 2...Website n": {
  Website 1=FamilySearch|
"description": "Sending a website name that corresponds with a Search link will will result in the following being added to the end of the printed link on the GuidedResearch page: FamilySearch => at FamilySearch; Findmypast => at Findmypast ($); Ancestry => at Ancestry ($); American Ancestors => at American Ancestors ($); myherMyHeritage => at MyHeritage ($);",
  Search link 2=|
"example": "Website 1=Ancestry",
  Website 2=Ancestry|
"type": "string",
  Search link 3=|
"default": "null"
  Website 3=FindMyPast|
}
<!-- etc... -->
},
}}
"description": "Template:GR start here - On the GuidedResearch pages, this template creates the 'Search a (Vital type) index' title and the 'Start Here' title. Also, the links in the section are output."
</nowiki>
}
</noinclude>
</templatedata>
[[Category:Guided Research]][[Category:Templates|Guided Research]][[Category:Guided Research Templates]]</noinclude>

Latest revision as of 17:13, 17 May 2022

Search an index

Start here:[edit source]

Code example:
The following is an example of a call to the template.  You can have as many links as desired, just make sure to start at 1 and do not skip any numbers in your list. (don't have 1, 2, 4, 6 - only 1 and 2 will be output.) See below for definitions of input values.
{{GR start here
|Vital=
|Search link 1=
|Website 1=
|Search link 2=
|Website 2=
}}

Template:GR start here - On the GuidedResearch pages, this template creates the 'Search a (Vital type) index' title and the 'Start Here' title. Also, the links in the section are output.

Template parameters

ParameterDescriptionTypeStatus
Vital typeVital type

Vital type - defines the header of the dropdown section on the Guided Research page. Current recommended vital types are Birth, Marriage and Death.

Default
null
Example
Vital type=Birth
Auto value
null
Stringoptional
Search link 1Search link 1

entire string containing the link to be printed in the 'Start here' section. 'Search link' will be output exactly as entered.

Default
null
Example
Search link 1=1500s-1900s: '''<u>[https://www.familysearch.org/search/record/results?count=20&offset=0&query=%2Brecord_country%3AItaly%20%2Brecord_type%3A1 Italy Marriage Collections]</u>'''
Auto value
null
Stringrequired
Search link 2; Search link 3; ....Search link 'n'

You can have as many Search links as needed to be printed in the 'Start here' section

Default
null
Example
Search link 2=1500s-1900s: '''<u>[https://www.familysearch.org/search/record/results?count=20&offset=0&query=%2Brecord_country%3AItaly%20%2Brecord_type%3A1 Italy Marriage Collections]</u>'''
Auto value
null
Stringoptional
Website 1, Website 2...Website nWebsite 1, Website 2...Website n

Sending a website name that corresponds with a Search link will will result in the following being added to the end of the printed link on the GuidedResearch page: FamilySearch => at FamilySearch; Findmypast => at Findmypast ($); Ancestry => at Ancestry ($); American Ancestors => at American Ancestors ($); myherMyHeritage => at MyHeritage ($);

Default
null
Example
Website 1=Ancestry
Stringoptional