Skip to content

Retrieve url path from template #747

@danielsawan

Description

@danielsawan

Hello,

I am looking for a way to get the actual URL from the freemarker template without using the Results.render(). I want it to be global.
I thought the Implicit functions ${contextPath} would do the trick but i got an empty result.
I also tried to use the TemplateEngineFreemarker and the setSharedVariable on each route request in Ninja.java but it gets overwritten if multiple requests run in parallels (not threadsafe or not for this type of usage).

And now I have no idea to do it.
Any help is appreciated.

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions