Template:GR Location of link: Difference between revisions

From FamilySearch Wiki
m (Text replacement - "FindMyPast" to "Findmypast")
No edit summary
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOEDITSECTION__
__NOEDITSECTION__
{{#if: {{{Website|}}}|
{{#ifeq: {{{LoginStatus|}}}|yes|
{{#switch: {{lc:{{{Website|}}}}}|
check login status here|<nowiki></nowiki>|}}
familysearch= at FamilySearch|
{{#switch: {{{Website|}}}|
family search= at FamilySearch|
"FamilySearch"=FamilySearch|
findmypast= at Findmypast ($)|
"FindMyPast"=FindMyPast ($)|
find my past= at Findmypast ($)|
"Ancestry"=Ancestry ($)|
ancestry= at Ancestry ($)|
}} <!-- end switch -->
americanancestors= at American Ancestors ($)|
<noinclude>
american ancestors= at American Ancestors ($)|
Call <nowiki>{{GR Location of link}}</nowiki> to add the text at the end of a link which indicates the website that the link is found. 
myheritage= at MyHeritage ($)|
my heritage= at MyHeritage ($)|
<nowiki></nowiki>}}|
<nowiki></nowiki>}}<noinclude>
example:
  <nowiki>
  <nowiki>
{{GR Location of link|
{{GR Location of link|
  Website={{{Website 1}}}
LoginStatus=|   <!-- if login status needs to be checked first (not yet implemented)-->
|}}
Website=FamilySearch|  <!-- FamilySearch, Ancestry, FindMyPast currently available in template -->
 
}}
Sending the below website names to this template will results in the following:
FamilySearch => at FamilySearch
Findmypast => at Findmypast ($)
Ancestry => at Ancestry ($)
American Ancestors => at American Ancestors ($)
myherMyHeritage => at MyHeritage ($)
 
</nowiki>
</nowiki>
This template will take the website information it receives then, based on that site, determine if the user needs to be logged in, and/or have the correct account to view the information in the link, and/or whether the site will cost money to view (adding a ($) sign).  If the user needs to be logged in, a message will be sent to the user.  Once logged in, if it is determined that the website will cost money, a ($) will be placed after the website location.
</noinclude>
</noinclude><nowiki></nowiki><noinclude>[[Category:templates]]</noinclude>

Revision as of 14:32, 11 June 2018


Call {{GR Location of link}} to add the text at the end of a link which indicates the website that the link is found.

{{GR Location of link|
LoginStatus=|    <!-- if login status needs to be checked first (not yet implemented)-->
Website=FamilySearch|  <!-- FamilySearch, Ancestry, FindMyPast currently available in template -->
}}