User:Johan G/Template:Informative template with preloaded text: Difference between revisions

Jump to navigation Jump to search
m
Intermediate save
m (Intermediate save. Sketching out better logic)
m (Intermediate save)
 
Line 8: Line 8:


-->
-->
  <nowiki>1 and doc is empty and /doc do not exist
  <nowiki>1 or doc defined or /doc exist
     1 is not empty
     /doc exist
         use 1
         doc defined
    doc is not empty
          doc = /doc
        /doc exist and doc is not /doc
              1
          trow error
              doc
        use doc
            else
              1
              warn
              doc
       else
       else
         /doc exist
         1
          use /doc
        /doc
   else
   else
     encourage writing /doc</nowiki></noinclude><includeonly>
     write /doc</nowiki>
 
Header
 
Top1
 
{{#if: {{{1|-{{{doc|{{#ifexist: {{FULLPAGENAME}}/doc | <!-- Yes -->}} }}} }}} <!-- Are 1 or doc defined or /doc exist? -->
  |  <!-- Yes, 1 or doc are defined or /doc exist -->
'''''1''' or '''doc''' are defined or '''/doc''' exist''
 
<!--
-->{{#ifexist: {{FULLPAGENAME}}/doc-  <!-- Is there a subpage /doc? -->
    |  <!-- Yes, there is a subpage /doc -->
''There is a subpage '''/doc'''''
 
'''1'''
 
<!--
  -->{{#ifeq: {{{doc|{{FULLPAGENAME}}/doc}}} | {{FULLPAGENAME}}/doc  <!-- Do doc point to /doc? -->
      |  <!-- Yes, doc point to /doc -->
'''''doc''' point to '''/doc'''''
 
'''doc'''
 
Top2
 
'''Transcluded'''
 
Bottom2
 
      |  <!-- No, doc do not point to /doc -->
'''''doc''' do not point to '''/doc'''''
 
'''warning'''
 
'''doc'''
 
Bottom1
 
Top2
 
'''Transcluded'''
 
Bottom2
 
<!--
  -->}}
    |  <!-- No, there is no subpage /doc -->
''There is no subpage '''/doc'''''
 
'''1'''
 
'''doc'''
 
Top2
 
'''Transcluded'''
 
Bottom2
 
<!--
-->}}
  |  <!-- No, 1 and doc are not defined and /doc do not exist -->
'''''1''' and '''doc''' are not defined and '''/doc''' do not exist''
 
'''Write /doc!'''
}}
 
Bottom1
 
</noinclude><includeonly>
__NOEDITSECTION__
__NOEDITSECTION__
__NOTOC__
__NOTOC__

Navigation menu