I have uploaded two Resources – a.HTML and b.PNG. In a I’d like to display b and according to this blog I should go like this.
<img src="$webresource:b.png">
However, I’d like to know if there’s an other syntax (preferably one that doesn’t includes the $webresource: part). I’ve tried with some different combinations but didn’t really succeeded.
The article you link to explains how to reference a web resource from within the Ribbon or Site Map. This is different to your goal which is to reference one web resource from another.
The CRM SDK states:
(Note that Web Resources themselves do not support the
$webresource:directive)So if you have two web resources called:
In
mypage.htmlyou can refer to the image thusly:By implication, if your resources (
a.HTMLandb.PNG) do not have virtual paths, it should be sufficient to reference the image like this (though I strongly recommend using the aforementioned Virtual Path convention):