Difference between revisions of "Template:Address"
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
{{Address | {{Address | ||
− | | address=304 N. Market St. | + | | address=304 N. Market St. |
− | | city=Wooster | + | | city=Wooster |
− | | state=Ohio | + | | state=Ohio |
− | | zip=44691 | + | | zip=44691 |
+ | | type=library | ||
}} | }} | ||
Revision as of 09:34, 11 August 2016
Use like:
{{Address | address=304 N. Market St. | city=Wooster | state=Ohio | zip=44691 | type=library }}
And you get:
304 N. Market St., Wooster, Ohio 44691
Parameters are: address
, unit
(for apartment, suite, unit, etc. numbers), city
, state
, and zip
. All parameters are optional.
Development codeblock
{{#if: {{{address|}}} | [[{{{address}}} {{#if: {{{unit|}}} |, {{{unit}}} }} {{#if: {{{city|}}} |, {{{city}}} }} {{#if: {{{state|}}} |, {{{state}}} }} {{!}}{{{address}}} {{#if: {{{unit|}}} |, {{{unit}}} }} ]] }} {{#if: {{{city|}}} | {{#if: {{{address|}}} |, {{!((}}{{{city}}} |{{!((}}{{{city}}} }} {{#if: {{{state|}}} | , | {{!))}} }} | {{#if: {{{state|}}} | {{!((}} }} }} {{#if: {{{state|}}} | {{{state}}}{{!))}} }} {{{zip|}}}
Code
Edit this section to modify production code.