Template:ButtonsGroup: Difference between revisions

From FamilySearch Wiki
(Created page with "<includeonly><div style="display:flex; flex-flow:row wrap; justify-content:flex-start; gap:20px;"> <div class="online_records_button" style="align-content:center;">[[{{#replace:{{PAGENAME}}|Genealogy|}} Online Genealogy Records]]</div> <div class="community_button" style="align-content:center;">Online<br>Research Help</div> <div class="red_online_button" style="align-content:center;">{{#replace:{{PAGENAME}}|Genealogy|}} Getting Started|Getting<...")
 
(Changed case for if standard PAGENAME-"Genealogy" doesn't exist.)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div style="display:flex; flex-flow:row wrap; justify-content:flex-start; gap:20px;">
<includeonly><div style="display:flex; flex-flow:row wrap; justify-content:flex-start; gap:20px;">
<div class="online_records_button" style="align-content:center;">[[{{#replace:{{PAGENAME}}|Genealogy|}} Online Genealogy Records]]</div>
<div class="online_records_button" style="align-content:center;">[[{{{RecordsLink|{{#replace:{{PAGENAME}}|Genealogy|}} Online Genealogy Records}}}|{{{RecordsName|{{#replace:{{PAGENAME}}|Genealogy|}} Online Genealogy Records}}}]]</div>
<div class="community_button" style="align-content:center;">[[Online Research Help|Online<br>Research Help]]</div>
<div class="community_button" style="align-content:center;">[[Online Research Help|Online<br>Research Help]]</div>
<div class="red_online_button" style="align-content:center;">[[{{#replace:{{PAGENAME}}|Genealogy|}} Getting Started|Getting<br>Started]]</div>
{{#if:{{{StartedLink|}}}|<div class="red_online_button" style="align-content:center;">[[{{{StartedLink|}}}|Getting<br>Started]]</div>|{{#ifexist: {{#replace:{{PAGENAME}}|Genealogy|}} Getting Started |<div class="red_online_button" style="align-content:center;">[[{{{StartedLink|{{#replace:{{PAGENAME}}|Genealogy|}} Getting Started}}}|Getting<br>Started]]</div>}}}}
</div></includeonly><noinclude>
</div></includeonly><noinclude>
<big>'''ButtonsGroup template'''</big><br>
<big>'''ButtonsGroup template'''</big><br>
This will return the "<Name> Online Genealogy Records", "Online Research Help", & "Getting Started" buttons, examples below.
This will return the "<Name> Online Genealogy Records", "Online Research Help", & "Getting Started" buttons, examples below.
<div style="display:flex; flex-flow:row wrap; justify-content:flex-start; gap:20px;">
<div style="display:flex; flex-flow:row wrap; justify-content:flex-start; gap:20px;">
<div class="online_records_button" style="align-content:center;">[[Dominican Republic Online Genealogy Records]]</div>
<div class="online_records_button" style="align-content:center;">[[Dominican Republic Online Genealogy Records]]</div>
Line 15: Line 13:




==Usage==
When used on Country pages or where the pagename conforms to the name/link for the target pages:
<pre style="max-width:170px; margin-left:25px;"><nowiki>
{{ButtonsGroup}}
</nowiki></pre>


Usage:
When the name/link for "Online Genealogy Records" and link for "Getting Started" needs to be modified:
<pre style="max-width:150px; margin-left:25px;"><nowiki>
<pre style="max-width:310px; margin-left:25px;"><nowiki>
{{ButtonsGroup}}
{{ButtonsGroup
|RecordsName=Records Display Name
|RecordsLink=Records Link
|StartedLink=Started Link
}}
</nowiki></pre>
</nowiki></pre>


==Notes==
# The template reads the pagename, strips anything after a comma and removes the word "Genealogy" for use on as the name/link for "Online Genealogy Records" and link for "Getting Started" which matches the usage on Country pages.
# The template checks if the "Getting Started" page exists and displays the button if so, hiding it otherwise.


[[Category:Template]]
[[Category:Template]]

Latest revision as of 17:33, 26 June 2025

ButtonsGroup template
This will return the "<Name> Online Genealogy Records", "Online Research Help", & "Getting Started" buttons, examples below.


Usage[edit source]

When used on Country pages or where the pagename conforms to the name/link for the target pages:

{{ButtonsGroup}}

When the name/link for "Online Genealogy Records" and link for "Getting Started" needs to be modified:

{{ButtonsGroup
|RecordsName=Records Display Name
|RecordsLink=Records Link
|StartedLink=Started Link
}}

Notes[edit source]

  1. The template reads the pagename, strips anything after a comma and removes the word "Genealogy" for use on as the name/link for "Online Genealogy Records" and link for "Getting Started" which matches the usage on Country pages.
  2. The template checks if the "Getting Started" page exists and displays the button if so, hiding it otherwise.