Wiki/Transclusion: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
(→‎OnlyInclude: add example -- copyable)
m (→‎top: remove extra newlines)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:WikiWG]]
[[Category:WikiWG]]
See [[mw:Transclusion]] & [[mw:Templates]]
See [[mw:Transclusion]] & [[mw:Templates]]


=Partial Transclusion=
=Partial Transclusion=
==OnlyInclude==
==OnlyInclude==
(oi) this is most often what you want. This tag renders content on direct view of the source page, and on template-inclusion view of the source page. It's is used on
(oi) this is most often what you want. This tag renders content on direct view of the source page, and on template-inclusion view of the source page. It's is used on
* [[EIN]]: {{:EIN}} (<code><nowiki>[[EIN]]: {{:EIN}}</nowiki></code>), and  
* [[EIN]]: ''{{:EIN}}'' (<code><nowiki>[[EIN]]: ''{{:EIN}}''</nowiki></code>), and  
* [[Mailing Address]]: {{:Mailing Address}}
* [[Mailing Address]]: (<code><nowiki>[[Mailing Address]]: ... {{:Mailing Address}}</nowiki></code>) {{:Mailing Address}}
 
===OI: Howto===
 
Worked example:
===OI: Worked example===
* [[Mailing Address]]:
* [[Mailing List]]:
  <nowiki>
  <nowiki>
  ==[[Onlyinclude]]d==
  ==[[Onlyinclude]]d==

Latest revision as of 12:22, 30 April 2024

See mw:Transclusion & mw:Templates

Partial Transclusion[edit | edit source]

OnlyInclude[edit | edit source]

(oi) this is most often what you want. This tag renders content on direct view of the source page, and on template-inclusion view of the source page. It's is used on

  • EIN: 26-3507741 ([[EIN]]: ''{{:EIN}}''), and
  • Mailing Address: ([[Mailing Address]]: ... {{:Mailing Address}})
Noisebridge
2261 Market Street #235-A
San Francisco, CA 94114

OI: Howto[edit | edit source]

Worked example:

 ==[[Onlyinclude]]d==
 <onlyinclude>
  Noisebridge
  2261 Market Street #235-A
  San Francisco, CA 94114
 </onlyinclude>
 

NoInclude[edit | edit source]

IncludeOnly[edit | edit source]

(io) This includes content, not on the main page, and only when page rendering is invoked as a template.

See also[edit | edit source]