Getting the right path

#1

Hello.
I am using a hyphens js plugin called hyphenopoly.

It uses a loader script that then loads the rest of the scripts it uses.

I can give it the path where to look for the scripts, but I need kirby for this.

The scripts are within assets/js/hyphenopoly/

If I use <?= $kirby->root('assets') ?> I get (on localhost) the system’s path http://localhost/var/www/html/webdev/vessel/assets/

But the path that works for hyphenopoly is the web server’s path http://localhost/webdev/vessel/assets/

How do I get the second?

Thank you

#2

Did you test $kirby->url('assets')?

Not tested, but I think this should help.

1 Like
#3

Thaaat is what I needed, thank you.