Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Javascript problems with image uri´s

Started by Muut Archive 11 years ago · 3 replies · 348 views
11 years ago

Hello all,

i've a problem, I need to get a file through my js, but the script cant find the uri. I've tried different options and search the docs again, but id not found any solution..

TXT
...
template: 'user/themes/promedia/templates/vendors/socialfeed/facebook.html',
...

Is there something like a pre defined function like in twig: {{ url(theme://**) }} ?

11 years ago

@muuvmuuv I guess you want to set a path in your theme config and use it in the theme, right? I haven't tested it, but {{ url(theme://**) }} should work.

11 years ago

I'm sorry i forgot to say that the js is in the theme/Promedia/js folder.
@Sommerregen No I want to get a file via JS. the above code is a twig thing and I dont know how I can get the same result for JS

11 years ago

You might already know it, but the path of the file you include must be relative to the js file path, not to the Grav root folder

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1348 9 years ago
Archive · by Muut Archive, 9 years ago
2 934 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2946 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago