Difference between revisions of "Module:Type in location/doc"
Jump to navigation
Jump to search
(Import from wikipedia) |
(Template Source Wikipedia) |
||
Line 15: | Line 15: | ||
Setting {{para|full-loc}} gives the full of the location (with slight processing) instead of the more general location. | Setting {{para|full-loc}} gives the full of the location (with slight processing) instead of the more general location. | ||
− | + | {{SourceWikipedia}} | |
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
<!-- Categories below this line, please; interwikis at Wikidata --> | <!-- Categories below this line, please; interwikis at Wikidata --> | ||
[[Category:Modules that create a short description]] | [[Category:Modules that create a short description]] | ||
}}</includeonly> | }}</includeonly> |
Latest revision as of 00:16, 20 September 2021
This is a documentation subpage for Module:Type in location. It contains usage information, categories and other content that is not part of the original module page. |
This Lua module is used on approximately 92,000 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
Usage
For generating short descriptions for infoboxes of structures/small places such as dams and museums, which are often in the format of type in location. Example:
{{#invoke:Type in location|main|{{{type|}}}|{{{location|}}}|check-patterns = [Mm]useum;foo;bar}}
Description only shows if check-pattern is matched in type.
Multiple check-patterns can be specified as "pattern1;pattern2;pattern3" and so on.
Also has helper functions of prepareLoc (for removing extraneous from addresses) and generalLoc (for getting more general location from specific address) which can be used seperately.
What is specified in the |invalidadd=
parameter will be added with a space if the check-patterns fail.
Setting |full-loc=
gives the full of the location (with slight processing) instead of the more general location.
This module (and the documentation) are based (partially) on Module:Type in location/doc from the free encyclopedia wikipedia and is licensed under GNU license for free documentation and the Creative Commons Attribution/Share Alike. On wikipedia there is a List of authors accessible. More about importing from wikipedia on page Imedwiki:Importing from wikipedia.