General Disclaimer:   (HV) (DC) injury or death hazard,   use at your own risk,   may void warranty.

Difference between revisions of "Template:Transclude"

From My wiki
Jump to navigation Jump to search
(Initial Template)
 
(enhanced transclusion template.)
 
Line 1: Line 1:
The Following content has been Transcluded from [[{{{1}}}]]:
+
[[Category:Transcluded|{{PAGENAME}}]]
 +
<includeonly>{{ #ifeq: {{{site| }}} | | <!-- legacy simple call without site/doc options --> The Following content has been [[Template:Transclude|Transcluded]] from [[{{{1}}}]]:
 
----
 
----
{{:{{{1}}}}}
+
{{:{{{2|{{{1}}}}}}}}  <!-- end legacy --> | The Following content has been [[Template:Transclude|Transcluded]] from [[{{{site}}}:{{{doc}}}]]{{ #ifeq: {{{local| }}} | | | , but <html><a href="#Local Content">Local Content</a></html> also exists }}:
 +
----
 +
{{:{{{site}}}Trans:{{{doc}}}}}{{ #ifeq: {{{local| }}} | | | <html><hr><hr><a name="Local Content"></a></html> }}
 +
}}
 +
<html><base href="</html>{{SERVER}}<html>" /></html>
 +
{{ #ifeq: {{{local| }}} | | | {{Transclude local}} }}
 +
</includeonly><noinclude>
 +
{{TOCright}}
 +
{{Template:Transclude/Useage}}
 +
{{Template:Transclude/Examples}}
 +
</noinclude>

Latest revision as of 03:25, 10 August 2007


Useage

Transclusing is the act of including the content from a page at another website within a local article. It can also be done far easier with content from other local articles, but this template doesn't apply to those. It is accomplished by using template-like syntax against an Interwiki link. See Wikipedia:Transclusion for more information about transclusion.

Our configured local interwiki links which are available for use consist of:Template:Local Interwiki Table

This template should be used to announce the interwiki transclusion of an article and ensure that the base url is returned to the local site after the transclusion has finished. Instances of MediaWiki handle this well enough on their own but transclusion from non-MediaWiki sites, such as a twiki or Typo3 site, require a little more work. Such sites should enforce fully qualified links, as relative links within their content won't work properly. It also allows for a simple and clean method to hiding local content within a collapsed table following the transcluded content.

Legacy Options

  1. The first option is the interwiki link for the url to be transcluded.
  2. The second option is the interwiki link for the transclusion option, used for non-Mediawiki sites.
ie:{{Transclude|ITdoc:WindowsInstallers|ITdocTrans:WindowsInstallers}}
The first option is the non transcluding interwiki url which takes you directly to the normal article.
The second option is a transcluding interwiki url with results in transclusion friendly output from the other site.

New Options

  1. The site option defines the base interwiki, you must have an identical interwiki ending in Trans defined.
  2. The doc option is the name of the document at the external site.
  3. The local=1 option lets the template know that the page also contains a local copy of the content.
    • A link is created to the tag #Local Content which is placed after the transclusion content.
    • Note: be sure to include |} at the end of the local content you wish to be hidden in the collapsed table.

Examples

Local transclusion

A local transclusion that doesn't use this template:
{{:Template:Terms}}

  • EAA = Electric Auto Association.
  • PHEV = Plug-in Hybrid Electric Vehicle.
  • SIG = Special Interest Group.
  • BMS = Battery Management System.
  • SOC = State Of Charge, is a percentage of the charge remaining. 20% SOC is 20% full.
    • DOD = Depth Of Discharge, the opposite of SOC, 20% DOD is 20% empty or 80% full.
  • CAN = Controller Area Network, used for vehicle communication between computer systems.
  • MFD = Multi-Function Display, or the Touch Screen which is standard on all Prius
  • IMA = Integrated Motor Assist, Honda Insight, Honda Civic Hybrid, Honda Accord Hybrid.
  • HSD = Hybrid Synergy Drive, Toyota Prius, Toyota Highlander, Lexus RX 400h.
  • AHS2 = Advanced Hybrid System 2, General Motors and DaimlerChrysler
  • FHS = Full or Ford Hybrid System, Ford Escape Hybrid, Mercury Mariner Hybrid.
  • V2G = Vehicle-to-grid, bi-directional charging and grid load balancing.
  • AER = All-Electric Range, the distance a vehicle can travel on its battery alone.
  • MPGe = Miles Per Gallon of Gasoline equivalent.

The same local transclusion utilizing this template:
{{Transclude|Template:Terms}}
The Following content has been Transcluded from Template:Terms:


  • EAA = Electric Auto Association.
  • PHEV = Plug-in Hybrid Electric Vehicle.
  • SIG = Special Interest Group.
  • BMS = Battery Management System.
  • SOC = State Of Charge, is a percentage of the charge remaining. 20% SOC is 20% full.
    • DOD = Depth Of Discharge, the opposite of SOC, 20% DOD is 20% empty or 80% full.
  • CAN = Controller Area Network, used for vehicle communication between computer systems.
  • MFD = Multi-Function Display, or the Touch Screen which is standard on all Prius
  • IMA = Integrated Motor Assist, Honda Insight, Honda Civic Hybrid, Honda Accord Hybrid.
  • HSD = Hybrid Synergy Drive, Toyota Prius, Toyota Highlander, Lexus RX 400h.
  • AHS2 = Advanced Hybrid System 2, General Motors and DaimlerChrysler
  • FHS = Full or Ford Hybrid System, Ford Escape Hybrid, Mercury Mariner Hybrid.
  • V2G = Vehicle-to-grid, bi-directional charging and grid load balancing.
  • AER = All-Electric Range, the distance a vehicle can travel on its battery alone.
  • MPGe = Miles Per Gallon of Gasoline equivalent.

https://www.eaa-phev.org" />



The same local transclusion utilizing this template and the local option:
{{Transclude|Template:Terms|local=1}}
Some Local Text
|}

The Following content has been Transcluded from Template:Terms:


  • EAA = Electric Auto Association.
  • PHEV = Plug-in Hybrid Electric Vehicle.
  • SIG = Special Interest Group.
  • BMS = Battery Management System.
  • SOC = State Of Charge, is a percentage of the charge remaining. 20% SOC is 20% full.
    • DOD = Depth Of Discharge, the opposite of SOC, 20% DOD is 20% empty or 80% full.
  • CAN = Controller Area Network, used for vehicle communication between computer systems.
  • MFD = Multi-Function Display, or the Touch Screen which is standard on all Prius
  • IMA = Integrated Motor Assist, Honda Insight, Honda Civic Hybrid, Honda Accord Hybrid.
  • HSD = Hybrid Synergy Drive, Toyota Prius, Toyota Highlander, Lexus RX 400h.
  • AHS2 = Advanced Hybrid System 2, General Motors and DaimlerChrysler
  • FHS = Full or Ford Hybrid System, Ford Escape Hybrid, Mercury Mariner Hybrid.
  • V2G = Vehicle-to-grid, bi-directional charging and grid load balancing.
  • AER = All-Electric Range, the distance a vehicle can travel on its battery alone.
  • MPGe = Miles Per Gallon of Gasoline equivalent.

https://www.eaa-phev.org" />

Interwiki transclusion

An interwiki transclusion similar to that of the Battery Management System article:

{{Transclude|SEVA:Battery Management System|local=1}}
====Local Stuff====
This local content contains stuff.
|}


The Following content has been Transcluded from SEVA:Battery Management System:


[Template fetch failed for http://www.seattleeva.org/mw/index.php?title=Battery_Management_System&action=render: HTTP 0] https://www.eaa-phev.org" />