Template:ButtonsGroup: Difference between revisions
No edit summary |
(→Notes) |
||
Line 22: | Line 22: | ||
# The template reads the pagename, strips anything after a comma and removes the word "Genealogy" which matches the usage on Country pages. | # The template reads the pagename, strips anything after a comma and removes the word "Genealogy" 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. | # The template checks if the "Getting Started" page exists and displays the button if so, hiding it otherwise. | ||
# There are several pages that don't have the same name/link format as Country pages, the template can be updated to include parameters to handle these cases if necessary. | # There are several pages that don't have the same name/link format as Country pages, the template can be updated to include parameters to handle these cases if necessary. The default logic is used if the parameter doesn't exist, for example: | ||
#: <syntaxhighlight lang="linux-config" style="max-width:300px;"> | |||
{{ButtonsGroup | |||
|RecordsName=Records Display Name | |||
|RecordsLink=Records Link | |||
|StartedName=Started Display Name | |||
|StartedLink=Started Link | |||
}} | |||
</syntaxhighlight> | |||
[[Category:Template]] | [[Category:Template]] |
Revision as of 11:47, 22 May 2025
ButtonsGroup template
This will return the "<Name> Online Genealogy Records", "Online Research Help", & "Getting Started" buttons, examples below.
Usage[edit source]
{{ButtonsGroup}}
Notes[edit source]
- The template reads the pagename, strips anything after a comma and removes the word "Genealogy" 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.
- There are several pages that don't have the same name/link format as Country pages, the template can be updated to include parameters to handle these cases if necessary. The default logic is used if the parameter doesn't exist, for example:
{{ButtonsGroup |RecordsName=Records Display Name |RecordsLink=Records Link |StartedName=Started Display Name |StartedLink=Started Link }}