Difference between revisions of "Template:MER-autoTable rfrsh"

From geofiction
Jump to navigation Jump to search
m
m
 
(3 intermediate revisions by the same user not shown)
Line 21: Line 21:
 
{{#clear_external_data:}}{{#get_web_data:url=https://osm3s.opengeofiction.net/api/interpreter?data={{#if:{{{area|}}} | <!--
 
{{#clear_external_data:}}{{#get_web_data:url=https://osm3s.opengeofiction.net/api/interpreter?data={{#if:{{{area|}}} | <!--
  
########################### Mergany
+
########################### Mergania
  
 
-->{{#ifeq:{{{area}}} | MER |
 
-->{{#ifeq:{{{area}}} | MER |
Line 73: Line 73:
 
-->{{ #If:{{{collapsible|}}} |
 
-->{{ #If:{{{collapsible|}}} |
 
{{ #If:{{{collapsed|}}} |
 
{{ #If:{{{collapsed|}}} |
{{{!}} class=&quot;wikitable sortable mw-collapsible mw-collapsed;&quot; |
+
{{{!}} class="wikitable sortable mw-collapsible mw-collapsed;" |
{{{!}} class=&quot;wikitable sortable mw-collapsible&quot; }} |
+
{{{!}} class="wikitable sortable mw-collapsible" }} |
{{{!}} class=&quot;wikitable sortable&quot; }} style=&quot;text-align:left; width:{{{width|500}}}px;&quot;
+
{{{!}} class="wikitable sortable" }} style="text-align:left; width:{{{width|500}}}px;"
 
|-  
 
|-  
! class=&quot;unsortable&quot; style=&quot;background:#{{{bgcolor|CCCCFF}}};&quot; {{ #If:{{{column9tag|}}} |
+
! class="unsortable" style="background:#{{{bgcolor|CCCCFF}}};" {{ #If:{{{column9tag|}}} |
colspan=&quot;9&quot; | {{ #If:{{{column8tag|}}} |
+
colspan="9" | {{ #If:{{{column8tag|}}} |
colspan=&quot;8&quot; | {{ #If:{{{column7tag|}}} |
+
colspan="8" | {{ #If:{{{column7tag|}}} |
colspan=&quot;7&quot; | {{ #If:{{{column6tag|}}} |
+
colspan="7" | {{ #If:{{{column6tag|}}} |
colspan=&quot;6&quot; | {{ #If:{{{column5tag|}}} |
+
colspan="6" | {{ #If:{{{column5tag|}}} |
colspan=&quot;5&quot; | {{ #If:{{{column4tag|}}} |
+
colspan="5" | {{ #If:{{{column4tag|}}} |
colspan=&quot;4&quot; | {{ #If:{{{column3tag|}}} |
+
colspan="4" | {{ #If:{{{column3tag|}}} |
colspan=&quot;3&quot; | {{ #If:{{{column2tag|}}} |
+
colspan="3" | {{ #If:{{{column2tag|}}} |
colspan=&quot;2&quot; | {{ #If:{{{column1tag|}}} |
+
colspan="2" | {{ #If:{{{column1tag|}}} |
colspan=&quot;1&quot; }} }} }} }} }} }} }} }} }} | {{{topic|Table}}}
+
colspan="1" }} }} }} }} }} }} }} }} }} | {{{topic|Table}}}
! class=&quot;unsortable&quot; style=&quot;background:#{{{bgcolor|CCCCFF}}}; text-align:right; width:50px;&quot; | {{Refresh}}
+
! class="unsortable" style="background:#{{{bgcolor|CCCCFF}}}; text-align:right; width:50px;" | {{Refresh}}
 
|-  
 
|-  
 
{{ #If:{{{column1tag|}}} |
 
{{ #If:{{{column1tag|}}} |
 
{{ #If:{{{column1sort|}}}{{{column1width|}}} |
 
{{ #If:{{{column1sort|}}}{{{column1width|}}} |
 
! {{ #If:{{{column1sort|}}} |
 
! {{ #If:{{{column1sort|}}} |
class=&quot;unsortable&quot; }} {{ #If:{{{column1width|}}} |
+
class="unsortable" }} {{ #If:{{{column1width|}}} |
style=&quot;width:{{{column1width}}}px;&quot; }} {{!}} | ! }} {{{column1name}}}
+
style="width:{{{column1width}}}px;" }} {{!}} | ! }} {{{column1name}}}
 
{{ #If:{{{column2tag|}}} |
 
{{ #If:{{{column2tag|}}} |
 
{{ #If:{{{column2sort|}}}{{{column2width|}}} |
 
{{ #If:{{{column2sort|}}}{{{column2width|}}} |
 
! {{ #If:{{{column2sort|}}} |
 
! {{ #If:{{{column2sort|}}} |
class=&quot;unsortable&quot; }} {{ #If:{{{column2width|}}} |
+
class="unsortable" }} {{ #If:{{{column2width|}}} |
style=&quot;width:{{{column2width}}}px;&quot; }} {{!}} | ! }} {{{column2name}}}
+
style="width:{{{column2width}}}px;" }} {{!}} | ! }} {{{column2name}}}
 
{{ #If:{{{column3tag|}}} |
 
{{ #If:{{{column3tag|}}} |
 
{{ #If:{{{column3sort|}}}{{{column3width|}}} |
 
{{ #If:{{{column3sort|}}}{{{column3width|}}} |
 
! {{ #If:{{{column3sort|}}} |
 
! {{ #If:{{{column3sort|}}} |
class=&quot;unsortable&quot; }} {{ #If:{{{column3width|}}} |
+
class="unsortable" }} {{ #If:{{{column3width|}}} |
style=&quot;width:{{{column3width}}}px;&quot; }} {{!}} | ! }} {{{column3name}}}
+
style="width:{{{column3width}}}px;" }} {{!}} | ! }} {{{column3name}}}
 
{{ #If:{{{column4tag|}}} |
 
{{ #If:{{{column4tag|}}} |
 
{{ #If:{{{column4sort|}}}{{{column4width|}}} |
 
{{ #If:{{{column4sort|}}}{{{column4width|}}} |
 
! {{ #If:{{{column4sort|}}} |
 
! {{ #If:{{{column4sort|}}} |
class=&quot;unsortable&quot; }} {{ #If:{{{column4width|}}} |
+
class="unsortable" }} {{ #If:{{{column4width|}}} |
style=&quot;width:{{{column4width}}}px;&quot; }} {{!}} | ! }} {{{column4name}}}
+
style="width:{{{column4width}}}px;" }} {{!}} | ! }} {{{column4name}}}
 
{{ #If:{{{column5tag|}}} |
 
{{ #If:{{{column5tag|}}} |
 
{{ #If:{{{column5sort|}}}{{{column5width|}}} |
 
{{ #If:{{{column5sort|}}}{{{column5width|}}} |
 
! {{ #If:{{{column5sort|}}} |
 
! {{ #If:{{{column5sort|}}} |
class=&quot;unsortable&quot; }} {{ #If:{{{column5width|}}} |
+
class="unsortable" }} {{ #If:{{{column5width|}}} |
style=&quot;width:{{{column5width}}}px;&quot; }} {{!}} | ! }} {{{column5name}}}
+
style="width:{{{column5width}}}px;" }} {{!}} | ! }} {{{column5name}}}
 
{{ #If:{{{column6tag|}}} |
 
{{ #If:{{{column6tag|}}} |
 
{{ #If:{{{column6sort|}}}{{{column6width|}}} |
 
{{ #If:{{{column6sort|}}}{{{column6width|}}} |
 
! {{ #If:{{{column6sort|}}} |
 
! {{ #If:{{{column6sort|}}} |
class=&quot;unsortable&quot; }} {{ #If:{{{column6width|}}} |
+
class="unsortable" }} {{ #If:{{{column6width|}}} |
style=&quot;width:{{{column6width}}}px;&quot; }} {{!}} | ! }} {{{column6name}}}
+
style="width:{{{column6width}}}px;" }} {{!}} | ! }} {{{column6name}}}
 
{{ #If:{{{column7tag|}}} |
 
{{ #If:{{{column7tag|}}} |
 
{{ #If:{{{column7sort|}}}{{{column7width|}}} |
 
{{ #If:{{{column7sort|}}}{{{column7width|}}} |
 
! {{ #If:{{{column7sort|}}} |
 
! {{ #If:{{{column7sort|}}} |
class=&quot;unsortable&quot; }} {{ #If:{{{column7width|}}} |
+
class="unsortable" }} {{ #If:{{{column7width|}}} |
style=&quot;width:{{{column7width}}}px;&quot; }} {{!}} | ! }} {{{column7name}}}
+
style="width:{{{column7width}}}px;" }} {{!}} | ! }} {{{column7name}}}
 
{{ #If:{{{column8tag|}}} |
 
{{ #If:{{{column8tag|}}} |
 
{{ #If:{{{column8sort|}}}{{{column8width|}}} |
 
{{ #If:{{{column8sort|}}}{{{column8width|}}} |
 
! {{ #If:{{{column8sort|}}} |
 
! {{ #If:{{{column8sort|}}} |
class=&quot;unsortable&quot; }} {{ #If:{{{column8width|}}} |
+
class="unsortable" }} {{ #If:{{{column8width|}}} |
style=&quot;width:{{{column8width}}}px;&quot; }} {{!}} | ! }} {{{column8name}}}
+
style="width:{{{column8width}}}px;" }} {{!}} | ! }} {{{column8name}}}
 
{{ #If:{{{column9tag|}}} |
 
{{ #If:{{{column9tag|}}} |
 
{{ #If:{{{column9sort|}}}{{{column9width|}}} |
 
{{ #If:{{{column9sort|}}}{{{column9width|}}} |
 
! {{ #If:{{{column9sort|}}} |
 
! {{ #If:{{{column9sort|}}} |
class=&quot;unsortable&quot; }} {{ #If:{{{column9width|}}} |
+
class="unsortable" }} {{ #If:{{{column9width|}}} |
style=&quot;width:{{{column9width}}}px;&quot; }} {{!}} | ! }} {{{column9name}}} }} }} }} }} }} }} }} }} }}  
+
style="width:{{{column9width}}}px;" }} {{!}} | ! }} {{{column9name}}} }} }} }} }} }} }} }} }} }}  
! class=&quot;unsortable&quot; | Map
+
! class="unsortable" | Map
 
|-
 
|-
 
{{#for_external_table:<nowiki/>
 
{{#for_external_table:<nowiki/>
Line 173: Line 173:
 
[[{{{{{{column9tag|}}}}}}]] | {{{{{{column9tag|}}}}}}
 
[[{{{{{{column9tag|}}}}}}]] | {{{{{{column9tag|}}}}}}
 
}} }} }} }} }} }} }} }} }} }}
 
}} }} }} }} }} }} }} }} }} }}
{{!}} [[File:OGFmapicon.png|18px|link=]] <span class=&quot;plainlinks&quot;>[https://opengeofiction.net/{{{type}}}/{{{{{{type}}}_id}}} map]</span>
+
{{!}} [[File:OGFmapicon.png|18px|link=]] <span class="plainlinks">[https://opengeofiction.net/{{{type}}}/{{{{{{type}}}_id}}} map]</span>
 
{{!}}-
 
{{!}}-
 
}} |}
 
}} |}
 
{{#clear_external_data:}}
 
{{#clear_external_data:}}
|}
+
|} [[Category:Site using autotable]]
 
</includeonly><noinclude>
 
</includeonly><noinclude>
  
Line 305: Line 305:
 
}}
 
}}
  
[[Category:Templates autotable]]
+
[[Category:Autotable templates]]
[[Category:Templates Mergania]]
+
[[Category:Mergan templates]]
[[Category:Templates overpass query]]
+
[[Category:Overpass templates]]</noinclude>
[[Category:Templates User:MStr]]</noinclude>
 

Latest revision as of 14:08, 3 January 2023


Usage

{{MER-autoTable_rfrsh
| relation    = ...relation number
| type        = {node,way} ...only ways OR nodes are possible
| topic       = ...topic of table
| width       = ...total width of table
| column1sort = {no, } ...if 1st column is unsortable
| column1name = ...name of 1st column
| column1tag  = ...name of 1st column tag to search for
| column2sort = {no, } ...if 2nd column is unsortable
| column2name = ...name of 2nd column
| column2tag  = ...name of 2nd column tag to search for
| column3sort = {no, } ...if 3rd column is unsortable
| column3name = ...name of 3rd column
| column3tag  = ...name of 3rd column tag to search for
| column4sort = {no, } ...if 4th column is unsortable
| column4name = ...name of 4th column
| column4tag  = ...name of 4th column tag to search for
| column5sort = {no, } ...if 5th column is unsortable
| column5name = ...name of 5th column
| column5tag  = ...name of 5th column tag to search for
| column6sort = {no, } ...if 6th column is unsortable
| column6name = ...name of 6th column
| column6tag  = ...name of 6th column tag to search for
| column7sort = {no, } ...if 7th column is unsortable
| column7name = ...name of 7th column
| column7tag  = ...name of 7th column tag to search for
| column8sort = {no, } ...if 8th column is unsortable
| column8name = ...name of 8th column
| column8tag  = ...name of 8th column tag to search for
| column9sort = {no, } ...if 9th column is unsortable
| column9name = ...name of 9th column
| column9tag  = ...name of 9th column tag to search for
}}

Example: List of Gobeletplain Cafés

{{MER-autoTable_rfrsh
| relation    = 48497
| type        = node
| topic       = List of Gobeletplain Cafés
| width       = 550
| column1name = Name
| column1tag  = name
| column2name = City
| column2tag  = is_in:city
| column3name = Country
| column3tag  = is_in:country
| column4sort = no
| column4name = Note
| column4tag  = ldata:note
}}
Error while fetching data from URL https://opengeofiction.net/api/0.6/relation/48497/full: $2.
There was a problem during the HTTP request: 410 Gone
Could not get URL https://opengeofiction.net/api/0.6/relation/48497/full after 3 tries.
List of Gobeletplain Cafés MER-refresh.png
Name City Country Note Map


Tests

Could not get URL https://osm3s.opengeofiction.net/api/interpreter?data=node%5B%22name%22%3D%22Gobeletplain%22%5D;out; after 3 tries.
List of Gobeletplain Cafés MER-refresh.png
Name City Country Note Map