Template:Legifrance/CTRANSP/doc
Appearance
![]() | This is a documentation subpage for Template:Legifrance/CTRANSP. It may contain usage information, categories and other content that is not part of the original template page. |
Generate the path portion of the Legifrance url after the domain, to an article or section in the transportation code.
Usage
[edit]{{Legifrance/CTRANSP|id|type}}
Parameters
[edit]There are two positional parameters:
|1=
, the id of the loi (L1000-2), décret (D1112-1), regulation (R1112-11) and so on. Required.- Should begin with
L
,D
, orR
followed by the numeric identifier, which may contain hyphens, e.g.,R1115-13-5
.
- Should begin with
|2=
, optional type, which may be 'art' (for article) or 'sect' (for section). Default: 'art'. Returns a "section"-style url if|2=sect
, providing the requested item in context; otherwise, a direct link to only the requested item.
Examples
[edit]Examples below are enhanced by the addition of an external link at the end, created by prefixing the path generated by the template with the main Légifrance domain, and appending the section number as anchor (display text) for verifiability.
- {{Legifrance/CTRANSP|L1000-2}} → /codes/article_lc/LEGIARTI000023086510 ⇨ L1000-2
- {{Legifrance/CTRANSP|L1000-2|sect}} → /codes/section_lc/LEGITEXT000023086525/LEGISCTA000023068935 ⇨ L1000-2 (in context)
- {{Legifrance/CTRANSP|L1121-1|sect}} → /codes/section_lc/LEGITEXT000023086525/LEGISCTA000023068997 ⇨ L1121-1 (in context)
- {{Legifrance/CTRANSP|D1112-1}} → /codes/article_lc/LEGIARTI000031212993 ⇨ D1112-1
- {{Legifrance/CTRANSP|D1112-1|sect}} → /codes/section_lc/LEGITEXT000023086525/LEGISCTA000029712600 ⇨ D1112-1 (in context)
- {{Legifrance/CTRANSP|R1112-11}} → /codes/article_lc/LEGIARTI000032479223 ⇨ R1112-11
If a number does not correspond to an article in the penitentiary code, then it returns zeroes for the article id (This will probably change going forward):
- {{Legifrance/CPEN|L12345-6789}} → /codes/article_lc/LEGIARTI000000000000
See also
[edit]{{Legifrance}}
{{Legifrance/CPEN}}
{{Legifrance/derive-url}}
{{Legifrance/base-decode}}