Wikisage, the free encyclopedia of the second generation and digital heritage, wishes you merry holidays and a happy new year!
Template:Facebook: Difference between revisions
(https://en.wikipedia.org/w/index.php?title=Template:Facebook&oldid=754333836) |
(Templateinfo instead of Documentation) |
||
Line 3: | Line 3: | ||
|<span class="error">{{[[Template:Facebook|Facebook]]}} template missing ID and not present in Wikidata.</span>{{Main other|[[Category:Facebook template missing ID]]}} | |<span class="error">{{[[Template:Facebook|Facebook]]}} template missing ID and not present in Wikidata.</span>{{Main other|[[Category:Facebook template missing ID]]}} | ||
}}<noinclude> | }}<noinclude> | ||
{{ | {{templateinfo|1= | ||
;Purpose | |||
This template produces a standardized link to a Facebook profile, page, or section. | |||
;Use | |||
The template is typically used in the 'External links' section of an article. | |||
;Example | |||
== Linking to a profile or Page == | |||
In this example, the Facebook user account is ''zuck'' and the description in the link is ''Mark Zuckerberg'': | |||
: <code><nowiki>{{Facebook|zuck|Mark Zuckerberg}}</nowiki></code> | |||
: {{Facebook|zuck|Mark Zuckerberg}} | |||
In this example, there's an ID instead of user name: | |||
: <code><nowiki>{{Facebook |id=4 |name=Mark Zuckerberg}}</nowiki></code> | |||
: {{Facebook|id=4|name=Mark Zuckerberg}} | |||
On the article about an individual, the display name and the article title will usually be identical and can be omitted. For example, on the article page [[Facebook]], linking to their own Facebook profile could be done with: | |||
: <code><nowiki>{{Facebook|facebook}}</nowiki></code> | |||
: {{Facebook|facebook}} | |||
=== Linking to a specific section === | |||
Links to specific sections on a Facebook page used to include the '=' symbol in the URL but no longer need to. Because '=' is a special character in Wikipedia template syntax (which separates a parameter's name from its value), it cannot be used directly in the id. If you want the link to arrive at a specific section, use the newer URL syntax, for example to link directly to the Photos section of a profile, add <code>/photos</code> to the username: | |||
: <code><nowiki>{{Facebook|zuck/photos|name=Mark Zuckerberg}}</nowiki></code> | |||
: {{Facebook|zuck/photos|name=Mark Zuckerberg}} | |||
}} | |||
<!-- Please add categories to the /doc subpage & add interwikis to Wikidata. --> | <!-- Please add categories to the /doc subpage & add interwikis to Wikidata. --> | ||
</noinclude> | </noinclude> |
Revision as of 13:54, 31 January 2017
- Purpose
This template produces a standardized link to a Facebook profile, page, or section.
- Use
The template is typically used in the 'External links' section of an article.
- Example
Linking to a profile or Page
In this example, the Facebook user account is zuck and the description in the link is Mark Zuckerberg:
{{Facebook|zuck|Mark Zuckerberg}}
- Mark Zuckerberg on FacebookTemplate:EditAtWikidata
In this example, there's an ID instead of user name:
{{Facebook |id=4 |name=Mark Zuckerberg}}
- Mark Zuckerberg on FacebookTemplate:EditAtWikidata
On the article about an individual, the display name and the article title will usually be identical and can be omitted. For example, on the article page Facebook, linking to their own Facebook profile could be done with:
{{Facebook|facebook}}
- {{safesubst:#Invoke:String|replace|Facebook|%s+%b()$||1|false}} on FacebookTemplate:EditAtWikidata
Linking to a specific section
Links to specific sections on a Facebook page used to include the '=' symbol in the URL but no longer need to. Because '=' is a special character in Wikipedia template syntax (which separates a parameter's name from its value), it cannot be used directly in the id. If you want the link to arrive at a specific section, use the newer URL syntax, for example to link directly to the Photos section of a profile, add /photos
to the username:
{{Facebook|zuck/photos|name=Mark Zuckerberg}}
- Mark Zuckerberg on FacebookTemplate:EditAtWikidata