Skip to content

Layouts with Context #981

Closed Answered by pczern
pczern asked this question in Q&A
Discussion options

You must be logged in to vote

Turns out using echo's c.Set("langCode", "en") is another context than set by

ctx := context.WithValue(c.Request().Context(), "title", siteTitle)
c.SetRequest(c.Request().WithContext(ctx))

that way also no parameters are needed in DefaultLayout

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pczern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant