Difference between revisions of "User:Ericb/Sandbox"

From MHWiki
(experiment with template, in sandbox this time)
m (experiment with table transclusion)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
It looks like this wiki lacks Extension:ParserFunctions, which means no <nowiki>{{#if:test|if text|if empty}}</nowiki>.  But I managed to work around that with my [[Template:If]], using double template nesting.  Once ParserFunctions are turned on, this should display 'hello world': {{#if:|text|hello}} {{#if:text|world|there}}.
 +
 
Next project(s):
 
Next project(s):
* is it possible to add optional subgroup to [[Template:Mouse]]?
+
* Finish linking to Larry's Loot Lexicon via [[Template:MHinfo]] - still to go: [[Crafting Items]], [[Special]], and [[Collectibles]].
* what else needs doing?
 
  
It looks like this wiki lacks Extension:ParserFunctions, which means no <nowiki>{{#if:test|if text|if empty}}</nowiki>.  But I think I can work around it with my own template, using double template nesting.  To test that...
+
Table experiment. See also the subpages transcluded here: [[User:Ericb/Sandbox/A|Sandbox/A]] [[User:Ericb/Sandbox/B|Sandbox/B]]
  
What happens if I use a template:
+
Jump within this table: [[#A|A]] [[#B|B]]
*with no argument: {{User:Ericb/Use}}
+
{| width="1000" class="sortable" cellpadding="10" cellspacing="0" border="0" style="margin:20px; border:3px solid #ddd; text-align:center; border-collapse:collapse;"
*with no named argument: {{User:Ericb/Use|discard}}
+
|-
*with named argument empty: {{User:Ericb/Use|use=}}
+
! style="background:#707070;" class="unsortable" |
*with named argument first: {{User:Ericb/Use|use=hello|discard}}
+
! style="border-bottom:2hIpx solid #ddd; background:#E4E4E4; text-align:left;" | Mouse
*with named argument second: {{User:Ericb/Use|discard|use=hello}}
+
! style="border-bottom:2px solid #ddd; background:#E4EEBA;" | Location(s)<br />
*with named argument twice: {{User:Ericb/Use|use=first|use=second}}
+
! style="border-bottom:2hIpx solid #ddd; background:#E4E4E4;" | Points
 +
! style="border-bottom:2hIpx solid #ddd; background:#E4E4E4;" | Gold
 +
! style="border-bottom:2px solid #ddd; background:#F2F2DB;" width="150" nowrap | Preferred [[Cheese]]<br />
 +
! style="border-bottom:2px solid #ddd; background:#D3E4F5;" width="100" | [[Mouse Group]]<br />
 +
! style="border-bottom:2px solid #ddd; background:#D3E4F5;" width="100" | '''Mouse'''<br/>'''Sub-Group'''<br />
 +
{{User:Ericb/Sandbox/A}}
 +
{{User:Ericb/Sandbox/B}}
 +
|}

Latest revision as of 20:21, 30 September 2015

It looks like this wiki lacks Extension:ParserFunctions, which means no {{#if:test|if text|if empty}}. But I managed to work around that with my Template:If, using double template nesting. Once ParserFunctions are turned on, this should display 'hello world': {{#if:|text|hello}} {{#if:text|world|there}}.

Next project(s):

Table experiment. See also the subpages transcluded here: Sandbox/A Sandbox/B

Jump within this table: A B

Mouse Location(s)
Points Gold Preferred Cheese
Mouse Group
Mouse
Sub-Group
A
Abominable Snow Mouse Mountain 1,750 1,750 Indigenous Mice
Acolyte Mouse Acolyte Realm 31,850 36,309 Runic The Forgotten Mice


B
Balack the Banished Balack's Cove 80,000 41,000 Vengeful Vanilla Stilton Balack's Banished