mNo edit summary |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
This template is still in development | This template is still in development | ||
This template will implement a guideline on a page. | This template will implement a guideline on a page. | ||
__TOC__ | |||
'''Syntax''' | |||
<nowiki>{{ guideline | <address> }}</nowiki> | |||
<address> could be: | |||
Segment/Length | |||
Segment/Length/Minimum | |||
Segment/Length/Maximum | |||
Segment/Address/Country | |||
Segment/Address/City | |||
Segment/Address/Street | |||
Segment/Address/AlternateStreetNames | |||
Segment/RoadType | |||
Segment/RoadType/Freeway | |||
Segment/RoadType/MajorHighway | |||
Segment/RoadType/MinorHighway | |||
Segment/RoadType/... | |||
Segment/TollRoad | |||
Segment/Direction | |||
Segment/Elevation | |||
Segment/Lock | |||
Segment/... | |||
Segment/KISS | |||
LandMark/... | |||
... | |||
== Guideline Address == | == Guideline Address == | ||
Line 20: | Line 46: | ||
There is one special Region that defines the default or general guideline. | There is one special Region that defines the default or general guideline. | ||
The name of this Special Region still needs to be defined. | The name of this Special Region still needs to be defined. | ||
For further explanation, I'll call this special region | For further explanation, I'll call this special region the '''Common''' region | ||
== How it should work == | == How it should work == | ||
Line 40: | Line 55: | ||
For further explanation, I'll call this as <region> | For further explanation, I'll call this as <region> | ||
Benelux/Roads/anothersubpage | Benelux/Roads/anothersubpage | ||
-> <Region> is Benelux | -> <Region> is here Benelux | ||
The template will try to find the following pages: | The template will try to find the following pages: | ||
[[<Region>/<address>]] | [[<Region>/Guidelines/<address>]] | ||
[[ | [[Common/Guidelines/<address>]] | ||
If a page is empty (Blanked), the page is considered as not found. | If a page is empty (Blanked), the page is considered as not found. | ||
If there is only the | If there is only the Common page (witch should occurs in most of the time), the content of the Common/Guidelines/<address> page is transcluded. | ||
If you want to overwrite the guideline, the page <Region>/<address> is created (contains content). In this case, the content of the | If you want to overwrite the guideline, the page <Region>/Guidelines/<address> is created (contains content). In this case, the content of the Common/Guidelines/<address> page is transcluded in small print and with strike through. Followed by the content of the <Region>/Guidelines/<address> page. | ||
A method of adding content to a guideline is not yet determined. | A method of adding content to a guideline is not yet determined. | ||
A possible method could be transcluding the | A possible method could be transcluding the Common/Guidelines/<address> page on to the <Region>/Guidelines/<address> page. | ||
If this could be detected, it is | If this could be detected, it is potentially the best solution. If not, this will result in the content of the Common/Guidelines/<address> page being placed twice, first strike through and then as normal. | ||
== Where is this templated used == | == Where is this templated used == | ||
Line 60: | Line 75: | ||
This template is used on general pages about a <Subject> like roads / highways / Landmarks ... | This template is used on general pages about a <Subject> like roads / highways / Landmarks ... | ||
This pages are located under | This pages are located under Common/<Subject> and make use of the Template:Guideline. | ||
Regions can then import these paged by creating a page called: | Regions can then import these paged by creating a page called: | ||
<Region>/<Subject> and the content will be transcluding the | <Region>/<Subject> and the content will be transcluding the Common/<Subject> page. | ||
content of page <Region>/<Subject>: | content of page <Region>/<Subject>: | ||
<nowiki>{{: | <nowiki>{{:Common/<Subject>}}</nowiki> | ||
This results in an immediate update on the region pages if the common page is updated so regions will be up to date when new guidelines are added. | |||
== Other examples on the web of advanced template useage == | |||
Take a look at the sourcecode of one of the following pages: | |||
http://wiki.cyanogenmod.org/w/Hammerhead_Info?setlang=en | |||
http://wiki.cyanogenmod.org/index.php?title=Install_CM_for_hammerhead&action=edit&setlang=en |
Latest revision as of 21:25, 27 February 2014
This is a documentation subpage for . It contains usage information, categories and other content that is not part of the original template page. |
This template is still in development This template will implement a guideline on a page.
Syntax
{{ guideline | <address> }} <address> could be: Segment/Length Segment/Length/Minimum Segment/Length/Maximum Segment/Address/Country Segment/Address/City Segment/Address/Street Segment/Address/AlternateStreetNames Segment/RoadType Segment/RoadType/Freeway Segment/RoadType/MajorHighway Segment/RoadType/MinorHighway Segment/RoadType/... Segment/TollRoad Segment/Direction Segment/Elevation Segment/Lock Segment/... Segment/KISS LandMark/... ...
Guideline Address
The guideline is defined by an address. For indexing purposes, the address may consist of different levels, separated with slashes (/). For further explanation, I'll call this the <address>
Roads/Country
Guideline Region
The Region of the guideline is where the guideline is applied. Examples of regions:
Benelux Belgium USA ...
There is one special Region that defines the default or general guideline. The name of this Special Region still needs to be defined. For further explanation, I'll call this special region the Common region
How it should work
{{ guideline | <address> }}
The guideline works out on which page it is transcluded. From the page name it will derive the base page name as the region where it is used. For further explanation, I'll call this as <region>
Benelux/Roads/anothersubpage -> <Region> is here Benelux
The template will try to find the following pages:
[[<Region>/Guidelines/<address>]] [[Common/Guidelines/<address>]]
If a page is empty (Blanked), the page is considered as not found.
If there is only the Common page (witch should occurs in most of the time), the content of the Common/Guidelines/<address> page is transcluded.
If you want to overwrite the guideline, the page <Region>/Guidelines/<address> is created (contains content). In this case, the content of the Common/Guidelines/<address> page is transcluded in small print and with strike through. Followed by the content of the <Region>/Guidelines/<address> page.
A method of adding content to a guideline is not yet determined. A possible method could be transcluding the Common/Guidelines/<address> page on to the <Region>/Guidelines/<address> page. If this could be detected, it is potentially the best solution. If not, this will result in the content of the Common/Guidelines/<address> page being placed twice, first strike through and then as normal.
Where is this templated used
This template is used on general pages about a <Subject> like roads / highways / Landmarks ...
This pages are located under Common/<Subject> and make use of the Template:Guideline.
Regions can then import these paged by creating a page called: <Region>/<Subject> and the content will be transcluding the Common/<Subject> page.
content of page <Region>/<Subject>: {{:Common/<Subject>}}
This results in an immediate update on the region pages if the common page is updated so regions will be up to date when new guidelines are added.
Other examples on the web of advanced template useage
Take a look at the sourcecode of one of the following pages:
http://wiki.cyanogenmod.org/w/Hammerhead_Info?setlang=en http://wiki.cyanogenmod.org/index.php?title=Install_CM_for_hammerhead&action=edit&setlang=en