This website requires JavaScript.
Explore
Help
Sign In
tandem
/
numerus
Watch
2
Star
0
Fork
You've already forked numerus
0
Code
Issues
39
Pull Requests
Packages
Projects
1
Releases
1
Wiki
Activity
985f843e8e
numerus
/
web
/
template
/
dashboard.gohtml
7 lines
105 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Move page titles to their respective templates I have been thinking about that, and it does not make that much sense to have the titles in the Go source anymore: most of them are static text that i have to remember to set in the controller each time, and when the time come i have to face a dynamic title i am sure i will manage with only the template capabilities—worst comes worst, i can always define a function. On the other hand, there is no way i can define a template without its title and i know that everytime that template is used, no matter what controller rendered it, it will always have that title.
2023-01-31 12:07:17 +00:00
{{ define "title" -}}
{{( pgettext "Dashboard" "title" )}}
{{- end }}
Use “layouts” for the common HTML between pages Had to call xgettext on Go source files because now the title comes from there, as i assume i will have titles like "Invoice #INVxxxx" that have to come from the database that the template does not know.
2023-01-22 20:41:50 +00:00
{{ define "content" }}
{{- end }}