param -> urlParam

This commit is contained in:
maddalax 2025-08-15 09:05:46 -05:00
parent 6f29b307ec
commit 5dba9d0167

View file

@ -11,7 +11,7 @@ var ExcludeRootSnippet = `automatic_page_routing_ignore: ["pages/root.go"]`
var AbstractedRootPageUsageSnippet = `func UserPage(ctx *h.RequestContext) *h.Page { var AbstractedRootPageUsageSnippet = `func UserPage(ctx *h.RequestContext) *h.Page {
return base.RootPage( return base.RootPage(
h.Div( h.Div(
h.Pf("User ID: %s", ctx.Param("id")), h.Pf("User ID: %s", ctx.UrlParam("id")),
), ),
}` }`
@ -88,7 +88,7 @@ func autoRegistration() *h.Element {
users.go -> /users users.go -> /users
users.$id.go -> /users/:id users.$id.go -> /users/:id
`), `),
HelpText(`Note: id parameter can be accessed in your page with ctx.Param("id")`), HelpText(`Note: id parameter can be accessed in your page with ctx.UrlParam("id")`),
Text(` Text(`
You may put any functions you like in your pages file, auto registration will ONLY register functions that return *h.Page You may put any functions you like in your pages file, auto registration will ONLY register functions that return *h.Page
`), `),