User:Happy-melon/sandbox5

imbox




'

# Detect and report usage with faulty "type" parameter if getParam( 'type', 'notice' ) not in types and getParam( 'type' ): print """ This message box is using an invalid "type=%s" parameter and needs fixing. """ % getParam( 'type' )

# Magic words are implemented as constants? if BASEPAGENAME == SUBPAGENAME and NAMEPACE == 'Template': print " " % PAGENAME

navbox
{{#switch:{{{border|{{{1|}}}}}}|subgroup|child= |none=|#default= {{#switch:{{{border|{{{1|}}}}}}|subgroup|child= |none=|#default=  }}

"   if params['border'] in ['subgroup','child']:        print " "    elif params['border'] == 'none':        pass    else:        print "   "

def doGroup(count, params): i = str(count) if params['list'+i]: if params['title'] or params['above'] or params['list1']: print "  " print ' ' if params['group'+i]: params['~groupstyle'] = params['group'+i+'style'] params['~group'] = params['group'+i] print """                     %(~group)s                     <td style='text-align:left;border-left-width:2px;border-left-style:solid;                  """ % params else: print "<td colspan='2' style='"
 * 1) Do a group/list block

if count % 2: params['~eostyle'] = params['oddstyle'] else: params['~eostyle'] = params['evenstyle'] if params['evenodd'] == 'swap': if count % 2: params['~evenodd'] = 'even' else: params['~evenodd'] = 'odd' else: if count % 2: params['~evenodd'] = getParam( 'evenodd', 'odd' ) else: params['~evenodd'] = getParam( 'evenodd', 'even' ) params['~liststyle'] = params['list'+i+'style'] params['~list'] = params['list'+i] print """width:100%;padding:0px;%(liststyle)s;%(~eostyle)s;%(~liststyle)s'                   class='navbox-list navbox-%(~evenodd)s">%(~list)s                """ % params

  " print ' ' if params['group'+i]: params['~groupstyle'] = params['group'+i+'style'] params['~group'] = params['group'+i] print """                     %(~group)s                     <td style='text-align:left;border-left-width:2px;border-left-style:solid;                  """ % params else: print "<td colspan='2' style='"
 * 1) Do a group/list block

if count % 2: params['~eostyle'] = params['oddstyle'] else: params['~eostyle'] = params['evenstyle'] if params['evenodd'] == 'swap': if count % 2: params['~evenodd'] = 'even' else: params['~evenodd'] = 'odd' else: if count % 2: params['~evenodd'] = getParam( 'evenodd', 'odd' ) else: params['~evenodd'] = getParam( 'evenodd', 'even' ) params['~liststyle'] = params['list'+i+'style'] params['~list'] = params['list'+i] print """width:100%;padding:0px;%(liststyle)s;%(~eostyle)s;%(~liststyle)s'                   class='navbox-list navbox-%(~evenodd)s">%(~list)s                """ % params

-->