Difference between revisions of "Template:Has location"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{#ifeq:{{{link|}}}|none | <!--not needed --> |{{#if:{{{alt|}}}|[[{{{alt page|}}}|{{{alt}}}]] |{{#if:{{{city|}}}|[[{{{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|}}}]]|}} }}{{#set: has street={{{street|}}} |has city={{{city|}}} |has county={{{county|}}} |has state={{{state|}}}|has country={{{country|}}} }}{{#if: {{{county|}}} | [[Category:{{{county|}}}]] | }}{{#if: {{{state|}}} | [[Category:{{{state|}}}]] | }}{{#if: {{{country|}}} | [[Category:{{{country|}}}]] | }} }}<noinclude>{{documentation}}</noinclude> | {{#ifeq:{{{link|}}}|none | <!--not needed --> |{{#if:{{{alt|}}}|[[{{{alt page|}}}|{{{alt}}}]] |{{#if:{{{city|}}}|[[{{{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|}}}]]|}} }}{{#set: has street={{{street|}}} |has city={{{city|}}} |has county={{{county|}}} |has state={{{state|}}}|has country={{{country|}}} }}{{#if: {{{county|}}} | [[Category:{{{county|}}}]] | }}{{#if: {{{state|}}} | [[Category:{{{state|}}}]] | }}{{#if: {{{country|}}} | [[Category:{{{country|}}}]] | }} }}<noinclude>{{documentation}}</noinclude> | ||
+ | |||
{{#if: {{{city|}}} |[[{{{city|}}}]]{{#if:{{{state|}}}{{{county|}}}{{{country|}}}|, |}} |<!--no city-->}} {{#if: {{{county|}}} |[[{{{county|}}}]]{{#if:{{{state|}}}{{{country|}}}|, |}} |<!--no state-->}} {{#if: {{{state|}}} |[[{{{state|}}}]]{{#if:{{{country|}}}|, |}}|<!--no county-->}} {{#if: {{{country|}}} |[[{{{country|}}}]] |<!-- no country -->}} | {{#if: {{{city|}}} |[[{{{city|}}}]]{{#if:{{{state|}}}{{{county|}}}{{{country|}}}|, |}} |<!--no city-->}} {{#if: {{{county|}}} |[[{{{county|}}}]]{{#if:{{{state|}}}{{{country|}}}|, |}} |<!--no state-->}} {{#if: {{{state|}}} |[[{{{state|}}}]]{{#if:{{{country|}}}|, |}}|<!--no county-->}} {{#if: {{{country|}}} |[[{{{country|}}}]] |<!-- no country -->}} | ||
+ | |||
+ | [[Category::{{{country|United States}}]] | ||
{{#subobject: | {{#subobject: | ||
Line 7: | Line 10: | ||
|has state = {{{state|}}} | |has state = {{{state|}}} | ||
|has county = {{{county|}}} | |has county = {{{county|}}} | ||
− | |has country = {{{country| | + | |has country = {{{country|United States}} |
}} | }} |
Revision as of 10:06, 1 March 2019
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.
[[Category::{Template:Country]]
Property "Has country" (as page type) with input value "{[[:Template:Country" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.