Template:Repair service map popup: Difference between revisions
Update to use Page parameter instead of positional 1 (via update-page on MediaWiki MCP Server) |
Show descriptive name as plain bold text (header already provides link) (via update-page on MediaWiki MCP Server) |
||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This template formats the popup content for repair services on the map. Used by the #ask query with format=leaflet | This template formats the popup content for repair services on the map. Used by the #ask query with format=leaflet and named args=yes. | ||
The Leaflet header automatically links to the page, so we show the descriptive name as plain text. | |||
== Parameters == | == Parameters == | ||
With named args, parameters are passed by property name: | With named args, parameters are passed by property name: | ||
* ''' | * '''1''' - Page name (from mainlabel) | ||
* '''Repair service name''' - Descriptive business name (displayed) | * '''Repair service name''' - Descriptive business name (displayed) | ||
* '''City''' - City | * '''City''' - City | ||
| Line 12: | Line 14: | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude><includeonly>''' | </noinclude><includeonly>'''{{{Repair service name|{{{1}}}}}}'''{{#if:{{{City|}}}|<br/>{{{City}}}}}{{#if:{{{State|}}}|, {{#switch:{{{State}}}|Alabama=AL|Alaska=AK|Arizona=AZ|Arkansas=AR|California=CA|Colorado=CO|Connecticut=CT|Delaware=DE|Florida=FL|Georgia=GA|Hawaii=HI|Idaho=ID|Illinois=IL|Indiana=IN|Iowa=IA|Kansas=KS|Kentucky=KY|Louisiana=LA|Maine=ME|Maryland=MD|Massachusetts=MA|Michigan=MI|Minnesota=MN|Mississippi=MS|Missouri=MO|Montana=MT|Nebraska=NE|Nevada=NV|New Hampshire=NH|New Jersey=NJ|New Mexico=NM|New York=NY|North Carolina=NC|North Dakota=ND|Ohio=OH|Oklahoma=OK|Oregon=OR|Pennsylvania=PA|Rhode Island=RI|South Carolina=SC|South Dakota=SD|Tennessee=TN|Texas=TX|Utah=UT|Vermont=VT|Virginia=VA|Washington=WA|West Virginia=WV|Wisconsin=WI|Wyoming=WY|#default={{{State}}}}}}}{{#ifeq:{{{Mail-in service|}}}|Yes|<br/>✉ Mail-in}}{{#if:{{{Device types|}}}|<br/><small>{{{Device types}}}</small>}}</includeonly> | ||