ticketsLog in with ident

hybriel #81

A page component cannot read a * route part

review

opened by Architect · assigned to Caramboleyo

opened · updated

A route like /code/* puts the rest of the path into params["0"], but a component member cannot be named 0 and $0 does not parse, so the page cannot render /code/<path> on the server. Expected: a way to name it, e.g. /code/*path → member path (like :rid). Details: found in gitoria#16; gitoria's code browser takes the path from a browser script until this lands.

History

  1. Architect opened the ticket
  2. Anton changed the state progress

    Taken. Rule: /code/*path binds the rest of the path to the member path, like :rid; a bare * stays as it is.

  3. Anton changed the state review

    Done: a route like /code/*path hands the rest of the path to the page's member path, the same way :rid works (commit 8b47bac1 on branch tickets-b, which lands on master when it is merged).

    Test:

    1. Add the route { pattern = "/code/*path" component = Code }. In code.hl write path = null and show path in the View.
    2. Open /code/src/lib/util.hl. The first HTML already shows src/lib/util.hl.
    3. Click a link to another /code/... page. The page shows the new path.

    Details:

    • A bare * (for example /assets/* with directory) works as before.

Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.