Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
BRUS Wikipedia
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Road data/strings/doc
(section)
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Get shortened URL
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Parser arguments=== When the parser function of [[Module:Road data/parser]] is called, it is passed up to three parameters. The second one is the field to parse, and the last one is a rarely-used option designed for multiple-shield types. The first and most important parameter is a table of arguments collected by the calling module, which generally includes the state, country, or both; the type and number of the route; and a few miscellaneous arguments. This table of arguments forms the basis of the parser's format string syntax. The table accessible by the strings includes the following entries by default: * <code>state</code>: The state or province the route is located in. * <code>country</code>: The country the route is located in. If the country is not passed by the calling module, the parser will attempt to include it. The above entries are primarily used to find the string module itself, so they should not be a concern for module writers. * <code>type</code>: The type of the route. This determines the entry of the root table that is used by the parser. * <code>route</code>: The route "number". This is easily the most important argument for module writers. The following entries are used less often: * <code>county</code>: The county the route is located in. This is usually used for county routes in the United States. * <code>township</code>: This entry is similar in function and utility to the <code>county</code> entry. * <code>dab</code>: A tag used to disambiguate the link target. This is mostly used for bannered routes in the United States. * <code>denom</code>: This rare entry is used exclusively for West Virginia county routes. Parser hooks, which will be described later, can add entries to this table that may be used by strings.
Summary:
Please note that all contributions to BRUS Wikipedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BRUS Wikipedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Preview page with this template