Template:Breadcrumbs/doc: Difference between revisions

template>Tomoneill
(in light to Official URL, turn off official link and turn on wikipedia)
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The template heavily leverages [[Interwiki links]] to connect to related pages on other wikis, both internal (Open EI and IM Wiki) and external (Wikipedia and Mediawiki).  
The template heavily leverages [[Interwiki links]] to connect to related pages on other wikis, both internal (Open EI and IM Wiki) and external (Wikipedia and Mediawiki).  
Note that this template is also designed to work natively within the [[Private wikis]] as well.


==Parameters==
==Parameters==
Line 16: Line 14:
|- valign=top
|- valign=top
| {{para|officialwebsite}} || Enter {{xt|yes}} or {{xt|no}} to set whether a link is shown to the site specified in {{para|url}}. || ''(Deprecated)'' The default is {{xt|yes}}. This parameter only has an effect if an official website URL is provided by {{para|url}}, and {{para|officialwebsite|no}} is specified so that the URL is ignored. A better solution in that case would be to simply omit the {{para|url}} parameter.
| {{para|officialwebsite}} || Enter {{xt|yes}} or {{xt|no}} to set whether a link is shown to the site specified in {{para|url}}. || ''(Deprecated)'' The default is {{xt|yes}}. This parameter only has an effect if an official website URL is provided by {{para|url}}, and {{para|officialwebsite|no}} is specified so that the URL is ignored. A better solution in that case would be to simply omit the {{para|url}} parameter.
|- valign=top
| {{para|energy}} || Enter the URL for the associated website on [http://energy.gov energy.gov] || If the primary website for the page is the energy.gov site, typically use the {{para|url}} parameter instead. This option is provided for when the official site for the page is an external site, but there is also an energy.gov site for the topic that should also be linked to.
|- valign=top
|- valign=top
| {{para|wikipedia}} || Enter {{xt|yes}} or {{xt|no}} to set whether a link is shown for Wikipedia. || The default is {{xt|yes}}.
| {{para|wikipedia}} || Enter {{xt|yes}} or {{xt|no}} to set whether a link is shown for Wikipedia. || The default is {{xt|yes}}.
Line 24: Line 20:
|- valign=top
|- valign=top
| {{para|commons}} || Enter {{xt|yes}} or {{xt|no}} to set whether a link is shown for Wiki Commons. || The default is {{xt|no}}.
| {{para|commons}} || Enter {{xt|yes}} or {{xt|no}} to set whether a link is shown for Wiki Commons. || The default is {{xt|no}}.
|- valign=top
| {{para|powerpedia}} || Enter {{xt|yes}} or {{xt|no}} to set whether a link is shown for Powerpedia. || The default is {{xt|no}}.
|- valign=top
| {{para|openei}} || Enter {{xt|yes}} or {{xt|no}} to set whether a link is shown for Open EI. || The default is {{xt|no}}.
|- valign=top
| {{para|imwiki}} || Enter {{xt|yes}} or {{xt|no}} to set whether a link is shown for IM Wiki. || The default is {{xt|no}}.
|- valign=top
|- valign=top
| {{para|other}} || Enter the URL for another site to link to || There are also {{para|other2}} through {{para|other9}} parameters for additional links.
| {{para|other}} || Enter the URL for another site to link to || There are also {{para|other2}} through {{para|other9}} parameters for additional links.
Line 35: Line 25:
| {{para|othername}} || Enter the name of the site, either as a link or as plain text || This should be used whenever {{para|other}} is used. It has no effect if {{para|other}} is not set. There are also {{para|othername2}} through {{para|othername9}} parameters for additional links.
| {{para|othername}} || Enter the name of the site, either as a link or as plain text || This should be used whenever {{para|other}} is used. It has no effect if {{para|other}} is not set. There are also {{para|othername2}} through {{para|othername9}} parameters for additional links.
|}
|}
==Examples==
{| width=100%
|-
! colspan=2 | The most basic usage (shown as it would appear if used in the [[Argonne National Laboratory]] article).
|- valign=top
|
{{pre|<nowiki>{{Breadcrumbs}}</nowiki>}}
|
{{Breadcrumbs|page=Argonne National Laboratory}}
|- valign=top
| &nbsp; ||
|-
! colspan=2 | More detailed breadcrumbs (shown as it would appear if used in the [[Advanced Research Projects Agency-Energy]] article).
|- valign=top
|
{{pre|<nowiki>{{Breadcrumbs
|url=http://arpa-e.energy.gov/
|other=https://www.facebook.com/arpaegov
|othername=[[Facebook]]
|other2=https://twitter.com/ARPAE
|othername2=[[Twitter]]
|other3=http://www.linkedin.com/company/advanced-research-projects-agency-energy-arpa-e-
|othername3=[[LinkedIn]]
|other4=http://www.flickr.com/photos/departmentofenergy/collections/72157623522274893/
|othername4=[http://www.flickr.com Flickr]
|other5=http://vimeo.com/arpae
|othername5=[http://vimeo.com Vimeo]
}}</nowiki>}}
|
{{Breadcrumbs
|page=Advanced Research Projects Agency-Energy
|url=http://arpa-e.energy.gov/
|other=https://www.facebook.com/arpaegov
|othername=[[Facebook]]
|other2=https://twitter.com/ARPAE
|othername2=[[Twitter]]
|other3=http://www.linkedin.com/company/advanced-research-projects-agency-energy-arpa-e-
|othername3=[[LinkedIn]]
|other4=http://www.flickr.com/photos/departmentofenergy/collections/72157623522274893/
|othername4=[http://www.flickr.com Flickr]
|other5=http://vimeo.com/arpae
|othername5=[http://vimeo.com Vimeo]
}}
|- valign=top
| &nbsp; ||
|- valign=top
! colspan=2 | Breadcrumbs for [[public key infrastructure]] (PKI) that could be used on any page with links to Energy.gov, Wikipedia, Powerpedia, and IM Wiki, but not Open EI, no official website, and no other websites (using all parameters). 
|- valign=top
|
{{pre|
<nowiki>{{Breadcrumbs
|align=right
|page=PKI
|url=
|officialwebsite=no
|energy=http://energy.gov/cio/pki
|wikipedia=yes
|mediawiki=no
|commons=no
|powerpedia=yes
|openei=no
|imwiki=yes
|other=
|othername=
|other2=
|othername2=
. . .
|other9=
|othername9=
}}</nowiki>}}
|
{{Breadcrumbs
|align=right
|page=PKI
|url=
|officialwebsite=no
|energy=http://energy.gov/cio/pki
|wikipedia=yes
|mediawiki=no
|commons=no
|powerpedia=yes
|openei=no
|imwiki=yes
|other=
|othername=
|other2=
|othername2=
|other3=
|othername3=
|other4=
|othername4=
|other5=
|othername5=
|other6=
|othername6=
|other7=
|othername7=
|other8=
|othername8=
|other9=
|othername9=
}}
|- valign=top
| &nbsp; ||
|- valign=top
! colspan=2 | A shorter version of the PKI breadcrumbs that uses defaults, and winds up with the same results. 
|- valign=top
|
{{pre|
<nowiki>{{Breadcrumbs
|page=PKI
|energy=http://energy.gov/cio/pki
|powerpedia=yes
|imwiki=yes
}}</nowiki>}}
|
{{Breadcrumbs
|page=PKI
|energy=http://energy.gov/cio/pki
|powerpedia=yes
|imwiki=yes
}}
|- valign=top
| &nbsp; ||
|- valign=top
! colspan=2 | A blank template you can copy from for use on other articles (unused parameters can be deleted)
|- valign=top
| colspan=2 |
{{pre|
<nowiki>{{breadcrumbs
|align=
|page=
|url=
|energy=
|wikipedia=yes
|imwiki=no
|openei=no
|other=
|othername=
}}</nowiki>}}
|}
<includeonly>
</includeonly>


==Template data==
==Template data==
Line 200: Line 44:
"autovalue": "no"
"autovalue": "no"
},
},
"energy": {},
"wikipedia": {
"wikipedia": {
"default": "yes",
"default": "yes",
Line 208: Line 51:
"mediawiki": {},
"mediawiki": {},
"commons": {},
"commons": {},
"powerpedia": {},
"openei": {},
"imwiki": {},
"other": {},
"other": {},
"othername": {},
"othername": {},