Resolving Image's URLS
В мем проекте в файлах css, и в html-коде используются пути к картинкам, js и css файлам от корня сервера: /img/icons/file.gif
Соответственно в IDE такие url, помечаются, как can not resolve url.
Я задал соответствие папок проекта урлам в разделе настроек Deploy. Однако это не помого, урлы все равно помечены, как ошибочные.
Не подскажите ли, как правильно с этим работать?
请先登录再写评论。
Hi Dmitry,
Mark your web root folder as Resource Root in File | Settings | Directories -- that's exactly what you need.
Thanks, this works in a simple case.
But I have the following structure
/root
/sites
/common.my.site.ru
common.my.site.ru is mapped to /common on the web-server.
Is there a way to work around this layout?
Hello Dmitry,
As far as I understand your case, mapping does not matter here.
What is the full path on development machine to your image file that you include with '/img/icons/file.gif' path?
Regards,
Kirill
Thank you for reply.
/common.my.site.ru/images/smile.gif
will be referenced as /common/images/smile.gif
Hello Dmitry,
I see now, to my regret currently your case is not supported.
I've created a bug report, please watch/vote to be notified when it's done: http://youtrack.jetbrains.net/issue/WI-3885.
Regards,
Kirill
Thank, you Kirill, for care.