Gynopedia needs your support! Please consider contributing content, translating a page, or making a donation today. With your support, we can sustain and expand the website. Gynopedia has no corporate sponsors or advertisers. Your support is crucial and deeply appreciated.

User:CasualTaiwan/Sec: Difference between revisions

From Gynopedia
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{#switch:{{{2}}}
{{deprecated|
Now that the [[mw:extension:labeled section transclusion|extension:labeled section transclusion]] extension is active here, this template is deprecated; please use the extension for any future work.
}}<noinclude>
 
This template is intended as a proof of concept, to demonstrate transcluding sections of articles. 
 
To transclude larger sections, it may be more useful to split the section into a daughter page, or some other seperate page/template, then transcluding that where necessary.  If you always transclude the same section, i.e. to transclude the body of text without extra boilerplate, then it should be simple to use &lt;onlyinclude&gt;.
 
However, when there are many smaller sections, it's simpler to mark the sections, and call them by name.  For example, if you have a a large article with small numbered sections, marked like
 
 
  This is a sample article, with a few sections
  &lt;onlyinclude><nowiki>{{{sec1|This is the first section}}}</nowiki>&lt;/onlyinclude>
  &lt;onlyinclude><nowiki>{{{sec2|This is the second section}}}</nowiki>&lt;/onlyinclude>
 
Then, you could transclude section 1 with
  <nowiki>{{User:Sanbeg/Sec|Article|1}}</nowiki>
 
 
All text between &lt;onlyinclude> and &lt;/onlyinclude> should be marked with a section (or marked somehow) to prevent unconditional transclusion.  Of course, it's possible to have multiple &lt;onlyinclude> blocks.
 
See [[User:Sanbeg/Test]] for an example.
 
Please contact me with any feedback. -[[User:Sanbeg|Sanbeg]] 19:28, 5 August 2006 (UTC)
 
<!--
  -- The following code is automatically generated.  Please do not modify it.
  -- Any modifications may be overwritten if the code is regenerated.
  -->
 
</noinclude>{{#switch:{{{2}}}
|1={{{{{ns|}}}:{{{1}}}  
|1={{{{{ns|}}}:{{{1}}}  
   |sec2=|sec3=|sec4=|sec5=|sec6=|sec7=|sec8=|sec9=|sec10=
   |sec2=|sec3=|sec4=|sec5=|sec6=|sec7=|sec8=|sec9=|sec10=

Revision as of 17:45, 4 October 2017

Template:Deprecated

This template is intended as a proof of concept, to demonstrate transcluding sections of articles.

To transclude larger sections, it may be more useful to split the section into a daughter page, or some other seperate page/template, then transcluding that where necessary. If you always transclude the same section, i.e. to transclude the body of text without extra boilerplate, then it should be simple to use <onlyinclude>.

However, when there are many smaller sections, it's simpler to mark the sections, and call them by name. For example, if you have a a large article with small numbered sections, marked like


 This is a sample article, with a few sections
 <onlyinclude>{{{sec1|This is the first section}}}</onlyinclude>
 <onlyinclude>{{{sec2|This is the second section}}}</onlyinclude>

Then, you could transclude section 1 with

 {{User:Sanbeg/Sec|Article|1}}


All text between <onlyinclude> and </onlyinclude> should be marked with a section (or marked somehow) to prevent unconditional transclusion. Of course, it's possible to have multiple <onlyinclude> blocks.

See User:Sanbeg/Test for an example.

Please contact me with any feedback. -Sanbeg 19:28, 5 August 2006 (UTC)