Relative path not working in global partial

I am developing a theme that I want to submit to marketplace.

I have a few custom DND modules in my footer, and they are called using an absolute path. i.e /theme/modules/example.module.
According to HubSpot verification, I need to make it a relative path. I have tried the following options.

../modules/example.module

./modules/example.module

/modules/example.module

When I use these paths, I get an error stating that it cannot find my module. However, when I use an absolute path, the error disapears.
How can I solve this problem?

So, it’ll depend on your folder structure, but assuming your footer is nested in templates/partials/footer.html you’ll want to go up two levels before going “down” to the modules folder, so ../../modules/example.module


Barry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

You are a god send thank you so much. It worked!