Module:Filter/doc
Appearance
This is a documentation subpage for Module:Filter. It contains usage information, categories and other content that is not part of the original module page. |
Summary
[edit]Lua support routines for simple textual filters.
Entry Points
[edit]CleanParentDirectories
: (partially) canonicalise passed page name by closing up ".." level references.
- e.g. [[Reference/Sub-page/../Sub-Page 2/Page Name]] is transformed into [[Reference/Sub-Page 2/Page Name]].
- This is useful because standard parser function {{#titleparts}} will not work with page names containing embedded "/../" sequences.
- e.g. {{#titleparts:Reference/Sub-page/../Sub-Page 2/Page Name|1|1}} yields: "Reference/Sub-page/../Sub-Page 2/Page Name",
- whereas {{#titleparts:Reference/Sub-Page 2/Page Name|1|1}} yields "Reference".
Utilisation
[edit]Currently used by these templates:
- {{TOC link}}: Create link internal to a given work; appropriate to current namespace (Page:/Index: or main)