Difference between revisions of "Template:Cite"

MuseWiki, wiki for the band Muse
Jump to navigation Jump to search
m (Fixed fail in previous revision)
(Try some magazine-specific logic)
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            = ''{{{title}}}'' ({{{date}}}).                                                     <!-- No author set -->
     | noauth            = {{#ifeq:{{{type}}} | magazine                                                      <!-- ------------- -->
                                | {{{title}}} ({{{date}}}).                                                  <!-- No author set -->
                                |''{{{title}}}'' ({{{date}}}).                                               <!-- ------------- -->
                            }}                                                                                <!-- ------------- -->
     | nodate            = {{{auth}}}. ''{{{title}}}''.                                                      <!-- No date set -->
     | nodate            = {{{auth}}}. ''{{{title}}}''.                                                      <!-- No date set -->
     | notitle            = {{{auth}}}. ({{{date}}}). [{{{desc |'''Description missing'''}}}].                <!-- No title set -->
     | notitle            = {{{auth}}}. ({{{date}}}). [{{{desc |'''Description missing'''}}}].                <!-- No title set -->
Line 13: 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 -->
     |                    = {{{auth}}}. ({{{date}}}). ''{{{title}}}''.                                         <!-- All's fine and dandy -->
     |                    = {{#ifeq:{{{type}}} | magazine                                                      <!-- -------------------- -->
                                | {{{auth}}}. ({{{date}}}). {{{title}}}.                                       <!-- All's fine and dandy -->
                                | {{{auth}}}. ({{{date}}}). ''{{{title}}}''.                                  <!-- -------------------- -->
                            }}                                                                                <!-- -------------------- -->
     | #default = Say, my good chap.  Have you checked the validity of your arguments?                        <!-- Brain fart -->
     | #default = Say, my good chap.  Have you checked the validity of your arguments?                        <!-- Brain fart -->
}}{{
}}{{
#if:{{{pub|}}} | &#32;{{{pub}}}{{
#if:{{{pub|}}} | &#32;{{
     #if:{{{issue|}}} | , {{{issue}}}
    #ifeq:{{{type}}} | magazine
          | ''{{{pub}}}''
          | {{{pub}}}
    }}{{
     #if:{{{issue|}}} | , ''{{{issue}}}''
     }}{{
     }}{{
     #if:{{{page|}}} | , {{{page}}}
     #if:{{{page|}}} | , {{{page}}}

Revision as of 00:58, 8 April 2011


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