Skip to content

cant register custom template functions #21

Description

@ovnicraft

Describe the bug

Reading docs: https://goadmin.dev/templates.html#custom-functions

funcMap := template.FuncMap{
    "upper": strings.ToUpper,
}

renderer := adminpanel.NewDefaultTemplateRenderer()
renderer.RegisterFuncMap(funcMap)

but panel has no RegisterFuncMap() func, i could not find it in src, is it already published?

search in repo:

https://github.com/search?q=repo%3Ago-advanced-admin%2Fadmin%20RegisterFuncMap&type=code

Expected behavior

Add custom template funcs.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions