Difference between revisions of "User:Ericb/Sandbox"

From MHWiki
(more experiments)
m (experiment with table transclusion)
 
(9 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...
 
  
What happens if I use a template:
+
Table experiment. See also the subpages transcluded here: [[User:Ericb/Sandbox/A|Sandbox/A]] [[User:Ericb/Sandbox/B|Sandbox/B]]
*with no argument: {{User:Ericb/Use}}
 
*with no named argument: {{User:Ericb/Use|discard}}
 
*with named argument empty: {{User:Ericb/Use|use=}}
 
*with named argument first: {{User:Ericb/Use|use=hello|discard}}
 
*with named argument second: {{User:Ericb/Use|discard|use=hello}}
 
*with named argument twice: {{User:Ericb/Use|use=first|use=second}}
 
  
Putting those pieces together:
+
Jump within this table: [[#A|A]] [[#B|B]]
*no args: {{User:Ericb/If}}
+
{| width="1000" class="sortable" cellpadding="10" cellspacing="0" border="0" style="margin:20px; border:3px solid #ddd; text-align:center; border-collapse:collapse;"
*1 empty arg: {{User:Ericb/If|}}
+
|-
*1 non-empty arg: {{User:Ericb/If|text}}
+
! style="background:#707070;" class="unsortable" |
*2 args, first empty: {{User:Ericb/If||true}}
+
! style="border-bottom:2hIpx solid #ddd; background:#E4E4E4; text-align:left;" | Mouse
*2 args, first text: {{User:Ericb/If|text|true}}
+
! style="border-bottom:2px solid #ddd; background:#E4EEBA;" | Location(s)<br />
*3 args, first empty: {{User:Ericb/If||true|false}}
+
! style="border-bottom:2hIpx solid #ddd; background:#E4E4E4;" | Points
*3 args, first text: {{User:Ericb/If|text|true|false}}
+
! 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