Difference between revisions of "Template:Id"

From Data JW United
Jump to navigation Jump to search
(Created page with "<noinclude> This template is used to give an id to an element. This can be useful for multiple reasons like providing links to subtitles that are located on a different page....")
 
 
Line 8: Line 8:
 
| <code><nowiki>{{raw:data:id|actual number id|content}}</nowiki></code> || <code><nowiki>{{raw:data:id|123|content}}</nowiki></code> || <div style="width:400px;">{{id|15|this is the content}}</div>
 
| <code><nowiki>{{raw:data:id|actual number id|content}}</nowiki></code> || <code><nowiki>{{raw:data:id|123|content}}</nowiki></code> || <div style="width:400px;">{{id|15|this is the content}}</div>
 
|-
 
|-
| <code><nowiki>{{raw:data:id|actual text id|content}}</nowiki></code> || <code><nowiki>{{raw:data:id| nice subtitle|this is the content}}</nowiki></code> || <div style="width:400px;">{{id|nice subtitle|this is the content}} - note: if space characters are used the id will replace spaces with "_". So in this case the id is "actual_text_id"</div>
+
| <code><nowiki>{{raw:data:id|actual text id|content}}</nowiki></code> || <code><nowiki>{{raw:data:id| nice subtitle|this is the content}}</nowiki></code> || <div style="width:400px;">{{id|nice subtitle|this is the content}} Note: in this case id is "actual_text_id".</div>
 
|}
 
|}
 
</noinclude>
 
</noinclude>
 +
<includeonly>
 
<div id="{{{1}}}">{{{2}}}</div>
 
<div id="{{{1}}}">{{{2}}}</div>
<includeonly>
+
</includeonly>

Latest revision as of 05:40, 16 April 2021

This template is used to give an id to an element. This can be useful for multiple reasons like providing links to subtitles that are located on a different page.

Usage

Code Example Result
{{raw:data:id|actual number id|content}} {{raw:data:id|123|content}}
this is the content
{{raw:data:id|actual text id|content}} {{raw:data:id| nice subtitle|this is the content}}
this is the content
Note: in this case id is "actual_text_id".