Resolving Image's URLS

В мем проекте в файлах css, и в html-коде используются пути к картинкам, js и css файлам от корня сервера: /img/icons/file.gif

Соответственно в IDE такие url, помечаются, как can not resolve url.

Я задал соответствие папок проекта урлам в разделе настроек Deploy. Однако это не помого, урлы все равно помечены, как ошибочные.

Не подскажите ли, как правильно с этим работать?

6 comments

Hi Dmitry,

Mark your web root folder as Resource Root in File | Settings | Directories -- that's exactly what you need.

0

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?

0

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

0

Thank you for reply.

/common.my.site.ru/images/smile.gif

will be referenced as /common/images/smile.gif

0

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

0

Please sign in to leave a comment.