Skip to content

Using baseurl in patterns #91

@yodasw16

Description

@yodasw16

I saw in the default template {{@root.baseurl}} so I tried to use it in a pattern to point to icons that I added to the assets directory. Using it here adds an extra ../. From what I can tell this happens because @root is the initial context that the template was executed in. Is there a way to use this in a pattern that I am just not seeing or do I have to hard code the directory levels?

I'm using it like this:
<use xlink:href="{{@root.baseurl}}/assets/toolkit/images/icons.svg#{{icon}}" />

and getting
<use xlink:href="../../../assets/toolkit/images/icons.svg#bell" />

when I should get
<use xlink:href="../../assets/toolkit/images/icons.svg#bell" />

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