USA/CommonState/SectionProcess: Difference between revisions Discussion View history

(added reversability)
(Supporting regions)
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ifeq: {{lc:{{{2|}}} }} | nocommon |<!-- No common display if unique exists -->
{{:USA/CommonState/{{{1|Intro}}}|common}}<!-- Display common content of template seen by all states. When viewed directly, it will show the Intro subpage as a placeholder. -->
  | {{:USA/CommonState/{{{1|Intro}}}}}<!-- Otherwise display common template seen by all states. When viewed directly, it will show the Intro subpage as a placeholder. -->
{{#ifeq: {{#titleparts:{{PAGENAME}} | 2 }} | USA/CommonState<!-- Check if viewing template directly -->
}}
{{#ifeq: {{ROOTPAGENAME}} | USA<!-- Check if viewing template directly -->
   | {{:USA/CommonState/UniqueSectionMsg}}<!-- Say final page will show here -->
   | {{:USA/CommonState/UniqueSectionMsg}}<!-- Say final page will show here -->
   | {{#ifexist: {{PAGENAME}}/{{{1|Intro}}}<!-- Check if unique state section exists -->
   | {{#ifexist: {{PAGENAME}}/{{{1|Intro}}}/Main<!-- Does unique state sec exist -->
       | {{:{{PAGENAME}}/{{{1|Intro}}}}}<!-- Display state unique section -->
       | <!-- On page Editing is currently disabled. See below. -->
       | {{#ifeq: {{lc:{{{2|}}} }} | nocommon<!-- If normally the section will show the unique content only, then only display the common data if the unique page is missing
        <div style="color:{{:{{PAGENAME}}/Settings|ColorOptional}}">{{:{{PAGENAME}}/{{{1|Intro}}}/Main}}</div><!-- Display state unique section --><!-- Color enhancement for illustration during testing phase. -->
-->       | {{:USA/CommonState/{{{1|Intro}}}}}
       | <!-- On page Creating is currently disabled. See below. -->
        }}<!-- end if nocommon with no state unique page -->
        <div style="color:{{:{{PAGENAME}}/Settings|ColorUnique}}">{{:USA/CommonState/{{{1|Intro}}}|optional}}</div>
        {{AddCode|File for unique state content for this section does not exist. Show editor how to add file. Use Show/Hide box.}}<!-- Tell how to add unique page -->
<!-- Display optional content of template only because the state unique section is not present --><!-- Color enhancement for illustration during testing phase. -->
     }}<!-- and if state unique page exists or not -->
     }}<!-- end if state unique page exists or not -->
}}<!-- end if viewing template directly or a transclusion -->
}}<!-- end if viewing template directly or a transclusion --><noinclude>{{documentation|:USA/CommonState/doc}}</noinclude><!--
{{clear}}<!-- Ensure anything in section is complete before next section --><noinclude>{{documentation|USA/CommonState/doc}}</noinclude>
 
 
 
{{EditPage|text=[http://wiki.waze.com/wiki/index.php?title={{urlencode:{{PAGENAME}}/{{{1|Intro}}}/Main|WIKI}}&action=edit&preview=yes&summary=*/{{urlencode:{{{1|Intro}}}|WIKI}}*/ Edit the {{{1|Intro}}} unique content for {{PAGENAME}}]}} -- Link to edit unique page --
 
 
{{CreatePage|text=State unique page for {{{1|Intro}}}/Main not found. If needed, [http://wiki.waze.com/wiki/index.php?title={{urlencode:{{PAGENAME}}/{{{1|Intro}}}/Main|WIKI}}&action=edit&preview=yes&summary={{urlencode:Initial page creation from preload|PATH}}&preload=USA/CommonState/{{{1|Intro}}}/Preload Create the unique {{{1|Intro}}} content for {{PAGENAME}}]}} -- Link to add unique page --
 
-->

Latest revision as of 07:00, 24 July 2014

CommonState is a part of the Testing region, which includes the states and/or territories of:

XXXX / YYYY.
The final state page will show unique state content here, or will say there is nothing unique from these guidelines.
Documentation[view] [edit] [history] [purge]

This template is part of the CommonState template suite. It is currently only set up to work on the United States and its territories.

Usage

Primary template

The primary template, {{[[::USA/CommonState|:USA/CommonState]]}}, is placed on each state page. It includes both code and displayed text that is used to combine the common guidance and the individual state unique guidance.

Supporting templates

Start

  • {{[[::USA/CommonState/Start|:USA/CommonState/Start]]}} - This template is used on new state pages as the only code on the page:
{{subst::USA/CommonState/Start}}
Once that page is saved it will automatically display the required template and supporting comments preventing users for editing the wrong content.
Alternately copy and paste this code below into the browser. Change the STATENAME at the end of the line to the name of the state or territory being created. Use the name as spelled in the Template:USA_Navbox
https://wiki.waze.com/wiki/index.php?action=submit&summary=Create%20new%20state&preload=USA/CommonState/Start&preview=yes&title=STATENAME

SectionProcess

  • {{[[::USA/CommonState/SectionProcess|:USA/CommonState/SectionProcess]]}} - This (Main namespace) template (not in the Template namespace) is called from the {{[[::USA/CommonState|:USA/CommonState]]}} template. It is the common logic used on the {{[[::USA/CommonState|:USA/CommonState]]}} template to determine if the universal content should come before or be displaced by the unique state content, and if the unique content subpage is not present, it provides a link to generate a unique content page. It has one required parameter with the name of the subpage for the section.

TalkTableElement

  • {{[[::USA/CommonState/TalkTableElement|:USA/CommonState/TalkTableElement]]}} - Helps build the subpage edit table.

Related templates

EditState

  • {{EditState}} - Placed on the talk page of a state or territory to edit the customized content for that state and use the preloads linked on Talk:USA/CommonState. That is also the best place from which to edit them as well.
The above documentation is transcluded from USA/CommonState/doc.
Subpages of this page.