Jump to content

Template:Show: Difference between revisions

From Sugar Labs
No edit summary
No edit summary
Line 8: Line 8:
Required parameters:
Required parameters:
# headline - the line of wiki text, for example, a link to remote content or just a header
# headline - the line of wiki text, for example, a link to remote content or just a header
# content  - the content wiki text. It may be another template for transclusion of a page or embedding of an external page, or just plain content that you user to be able to expand or collapse.
# content  - the content wiki text. It may be another template for transclusion of a page or embedding of an external page, or just plain content that you want the reader to be able to expand or collapse.


Optional, named parameter:
Optional, named parameter:
Line 18: Line 18:


<big>
<big>
<pre><nowiki>{{Show|[http://activities.sugarlabs.org Sugar Activity Library]|{{#widget:Iframe
<pre><nowiki>{{Show|[http://activities.sugarlabs.org Sugar Activity Library]|{{Iframe
|url=http://activities.sugarlabs.org
|[http://activities.sugarlabs.org Sugar Activity Library]
|width=900
|http://activities.sugarlabs.org
|height=342
|900|600|1}}
|border=1
}}</nowiki>
}}}}</nowiki>
</pre></big>
</pre></big>
{{Show|[http://activities.sugarlabs.org Sugar Activity Library]|{{#widget:Iframe
{{Show|[http://activities.sugarlabs.org Sugar Activity Library]|{{#widget:Iframe

Revision as of 21:18, 26 April 2010

This template produces a [show]/[hide] frame that can be hidden or shown on initial display of a wiki page.

Usage

{{Show|collapsed=collapsed|headline|content}}

Required parameters:

  1. headline - the line of wiki text, for example, a link to remote content or just a header
  2. content - the content wiki text. It may be another template for transclusion of a page or embedding of an external page, or just plain content that you want the reader to be able to expand or collapse.

Optional, named parameter:

  1. collapsed -- may have one of 2 possible values:
    • collapsed -- (the default) -- hides the content and produces a [show] link after the headline
    •                 -- (nothing) entered as |collapsed=| -- the content will show below the header, which will have a [hide] link next to it.

Example

{{Show|[http://activities.sugarlabs.org Sugar Activity Library]|{{Iframe
|[http://activities.sugarlabs.org Sugar Activity Library] 
|http://activities.sugarlabs.org
|900|600|1}}
}}