Difference between revisions of "Template:Has location"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | {{#ifeq:{{{link|}}}|none|<!--show nothing --> |{{#if:{{{alt|}}}|[[{{{alt page|}}}|{{{alt}}}]] | | + | {{#ifeq:{{{link|}}}|none|<!--show nothing --> |{{#if:{{{alt|}}}|[[{{{alt page|}}}|{{{alt}}}]] |{{#if:{{{city|}}}|[[{{{city}}}{{#if:{{{state|}}}|, {{{state}}} |<!--don't add state to city link-->}}|{{{city}}}]]{{#if:{{{county|}}}|, |{{#if:{{state|}}|, |{{#if:{{{country|}}}|, |}} }} }}|}} {{#if:{{{county|}}}|[[:Category:{{{county|}}}|{{{county|}}}]]|}}{{#if:{{{state|}}}|{{#if:{{{county|}}}|, |}} [[:Category:{{{state|}}}|{{{state|}}}]]|}}{{#if:{{{country|}}}|{{#if:{{{state|}}}|, |}}[[:Category:{{{country|}}}|{{{country|}}}]]|}} }} {{#if: {{{county|}}} | [[Category:{{{county|}}}]] | }}{{#if: {{{state|}}} | [[Category:{{{state|}}}]] | }}{{#if: {{{country|}}} | [[Category:{{{country|}}}]] | }} }}{{#switch: {{{save|}} |
|no=<!--don't save--> | |no=<!--don't save--> | ||
|#default={{#subobject: | |#default={{#subobject: | ||
Line 9: | Line 9: | ||
|has country={{{country|}}} | |has country={{{country|}}} | ||
}} }}<noinclude>{{documentation}}</noinclude> | }} }}<noinclude>{{documentation}}</noinclude> | ||
+ | |||
+ | {{#if:{{{street|}}}|[[{{{street|}}}{{#if: {{{city|}}}{{{state|}}}|, | }}{{#if:{{{city|}}}|{{#if:{{{state|}}}|{{{city|}}}, {{{state|}}}|{{{city|}}} }} | }} {{#if: {{{state|}}}|, {{{state|}}}| }}]] | }} |
Revision as of 22:34, 28 November 2020
Usage:
{{has location |city={{{city}}} |county={{{county}}} |state={{{state}}} |country={{{country}}} |alt={{{alt}}} |alt page={{{alt page}} }}
use link=none to hide text, and save data only
This was transcended from Template:Has location/doc.