16 lines
339 B
Go
16 lines
339 B
Go
package filter
|
|
|
|
import (
|
|
"gitbase.de/apairon/mark2web/context"
|
|
"github.com/flosch/pongo2"
|
|
)
|
|
|
|
// RelativePathFilter returns the relative path to navpoint based on current nav
|
|
func RelativePathFilter(in, param *pongo2.Value) (*pongo2.Value, *pongo2.Error) {
|
|
return pongo2.AsValue(
|
|
context.ResolveNavPath(
|
|
in.String(),
|
|
),
|
|
), nil
|
|
}
|