Difference between revisions of "Template:Cite"

MuseWiki, wiki for the band Muse
Jump to navigation Jump to search
(Try some magazine-specific logic)
m (type→med)
Line 6: Line 6:
#switch: {{
#switch: {{
     #if:{{{auth |}}} | | noauth}}{{#if:{{{date |}}} | | nodate}}{{#if:{{{title |}}} | | notitle}}
     #if:{{{auth |}}} | | noauth}}{{#if:{{{date |}}} | | nodate}}{{#if:{{{title |}}} | | notitle}}
     | noauth            = {{#ifeq:{{{type}}} | magazine                                                      <!-- ------------- -->
     | noauth            = {{#ifeq:{{{med}}} | magazine                                                      <!-- ------------- -->
                                 | {{{title}}} ({{{date}}}).                                                  <!-- No author set -->
                                 | {{{title}}} ({{{date}}}).                                                  <!-- No author set -->
                                 |''{{{title}}}'' ({{{date}}}).                                                <!-- ------------- -->
                                 |''{{{title}}}'' ({{{date}}}).                                                <!-- ------------- -->
Line 16: Line 16:
     | nodatenotitle      = {{{auth}}}. [{{{desc |'''Description missing'''}}}].                              <!-- No date nor title set -->
     | nodatenotitle      = {{{auth}}}. [{{{desc |'''Description missing'''}}}].                              <!-- No date nor title set -->
     | noauthnodatenotitle = [{{{desc |'''Description missing'''}}}].                                          <!-- None set, so print description -->
     | noauthnodatenotitle = [{{{desc |'''Description missing'''}}}].                                          <!-- None set, so print description -->
     |                    = {{#ifeq:{{{type}}} | magazine                                                      <!-- -------------------- -->
     |                    = {{#ifeq:{{{med}}} | magazine                                                      <!-- -------------------- -->
                                 | {{{auth}}}. ({{{date}}}). {{{title}}}.                                      <!-- All's fine and dandy -->
                                 | {{{auth}}}. ({{{date}}}). {{{title}}}.                                      <!-- All's fine and dandy -->
                                 | {{{auth}}}. ({{{date}}}). ''{{{title}}}''.                                  <!-- -------------------- -->
                                 | {{{auth}}}. ({{{date}}}). ''{{{title}}}''.                                  <!-- -------------------- -->
Line 23: Line 23:
}}{{
}}{{
#if:{{{pub|}}} | &#32;{{
#if:{{{pub|}}} | &#32;{{
     #ifeq:{{{type}}} | magazine
     #ifeq:{{{med}}} | magazine
           | ''{{{pub}}}''
           | ''{{{pub}}}''
           | {{{pub}}}
           | {{{pub}}}

Revision as of 00:59, 8 April 2011


Here be a reference template with lots of cases depending on the variables set.