Difference between revisions of "Template:Infobox"
Line 87: | Line 87: | ||
| save = TRUE | | save = TRUE | ||
}}{{#set:localname={{#if:{{{localname|{{{local name|{{{name}}}}}}}}}|{{{localname|{{{local name|{{{name}}}}}}}}}|{{{name|{{FULLPAGENAME}}}}}}}}}{{#if:{{{town|}}} | }}{{#set:localname={{#if:{{{localname|{{{local name|{{{name}}}}}}}}}|{{{localname|{{{local name|{{{name}}}}}}}}}|{{{name|{{FULLPAGENAME}}}}}}}}}{{#if:{{{town|}}} | ||
− | |{{ | + | | {{{ |
− | + | townName = {{#str:replace|{{{town}}}|^[A-Z][A-Z]-\S+ |}} | |
− | + | zip = {{#str:replace|{{{town}}}|^([A-Z][A-Z]-\S+) .*$|$1}} | |
− | + | }}} | |
− | | | + | {{#ifeq:{{{town}}}|{{{townName}}}|| |
− | }}{{infoboxRow | + | {{#ifeq:{{#str:substr|{{{zip}}}|0|2}}|SI| |
− | + | {{infoboxRow | |
− | + | | label = Region | |
− | + | | name = Region | |
− | + | | value = {{{region|{{#str:substr|{{{town|}}}|0|4}}}}} | |
− | }}{{infoboxRow | + | | type = text |
− | + | }} | |
− | + | }} | |
− | + | {{infoboxRow | |
− | + | | label = Zip | |
− | }}}}{{infoboxRow | + | | name = Zip |
+ | | value = {{{zip}}} | ||
+ | | type = hidden | ||
+ | }}{{infoboxRow | ||
+ | | label = TownName | ||
+ | | name = TownName | ||
+ | | value = {{{townName}}} | ||
+ | | type = hidden | ||
+ | }} | ||
+ | }} | ||
+ | }} | ||
+ | {{infoboxRow | ||
| label = Post | | label = Post | ||
| hidden = TRUE | | hidden = TRUE |
Revision as of 21:03, 12 February 2014
Prekopiraj spodnjo strukturo v izvorno kodo članka. Pri Image vpiši samo ime slike.
{{Infobox | name = | local name = | logo = | image = | street = | town = | region = ''if not in Slovenia'' | country = ''if not in Slovenia'' | website = | email = | telephone = | fax = | founded by = | founded by 2 = | founded by 3 = | founded by 4 = | organised by = | organised by 2 = | organised by 3 = | managed by = | managed by 2 = | managed by 3 = | published by = | published by 2 = | published by 3 = | opening hours = | official hours = | frequency = | dates and duration = | duration weeks = for festivals | contacts = {{Contact | name = | role = | street = | town = | website = | email = | telephone = | fax = }}{{Contact | name = | role = | street = | town = | website = | email = | telephone = | fax = }}{{Contact | name = | role = | street = | town = | website = | email = | telephone = | fax = }} }}