Mô đun:Path/tài liệu
Giao diện
| Đây là một trang con tài liệu dành cho Mô đun:Path. Nó gồm có các thông tin hướng dẫn sử dụng, thể loại và các nội dung khác không thuộc về phần trang mô đun gốc. |
| Mô đun này được xếp loại beta. Nó được đánh giá là sẵn sàng để sử dụng rộng rãi, nhưng vì nó vẫn còn khá là mới, nên vẫn cần phải được sử dụng một cách thận trọng để đảm bảo rằng kết quả đạt được như mong đợi. |
This module offers utilities to convert paths into different formats.
Functions Mô đun:Path/tài liệu
Ghi chú: In all functions the |1= argument can indifferently be a relative (i.e. beginning with ./ or ../ or /) or an absolute path.
abs
The abs function parses the |1= argument and returns it as an absolute path.
Examples
{{#invoke:path|abs|./example}}- ↳ Mô đun:Path/tài liệu/example
{{#invoke:path|abs|.}}- ↳ Mô đun:Path/tài liệu
{{#invoke:path|abs|Wikipedia:Lua}}- ↳ Wikipedia:Lua
{{#invoke:path|abs}}- ↳ Mô đun:Path/tài liệu
rel
The rel function parses the |1= argument and returns it as a relative path.
Examples
{{#invoke:path|rel|Mô đun:Path/example}}- ↳ ../example
{{#invoke:path|rel|Mô đun:Path}}- ↳ ..
{{#invoke:path|rel|Wikipedia:Lua}}- ↳ Wikipedia:Lua
{{#invoke:path|rel}}- ↳ .
[[Mô đun:Path/example|{{#invoke:path|rel|Mô đun:Path/example}}]]- ↳ ../example
- See also {{Relative link}}
- ↳ ../example
sub
The sub function parses the |1= argument and returns it as a partial path with only the subpages shown.
Examples
{{#invoke:path|sub|Mô đun:Path/example}}- ↳ example
{{#invoke:path|sub|Mô đun:Path}}- ↳
{{#invoke:path|sub|Wikipedia:Lua}}- ↳ Wikipedia:Lua
{{#invoke:path|sub}}- ↳
[[Mô đun:Path/example|{{#invoke:path|sub|Mô đun:Path/example}}]]- ↳ example
- See also {{Relative link implicit}}
- ↳ example
See also Mô đun:Path/tài liệu
- {{Relative link}}
- {{Relative link implicit}}
- Thể loại:Mô đun hỗ trợ Wikipedia