You need to sign in to do that
Don't have an account?
CraigH
unable to compile URLFOR
Hi
I am trying to access an image file in a static resource archive:
<apex:page >
<!-- Begin Default Content REMOVE THIS -->
<h1>Congratulations</h1>
This is your new Page
{!URLFOR(!$Resource.test2, 'simmlogo.gif')}
<!-- End Default Content REMOVE THIS -->
</apex:page>
<apex:page >
<h1>Congratulations</h1>
This is your new Page
{!URLFOR(!$Resource.test2, 'simmlogo.gif')}
</apex:page>
However, when I try to compile, I get:
Error: Incorrect parameter for function not(). Expected Boolean, received Text
Any ideas on what is wrong??
It's that exclamation mark (which is the not operator), preceding the $resource... parameter. Try just
{!URLFOR($Resource.test2, 'simmlogo.gif')}
All Answers
It's that exclamation mark (which is the not operator), preceding the $resource... parameter. Try just
{!URLFOR($Resource.test2, 'simmlogo.gif')}
Good catch - thanks!
I copied the code directly from the VF reference guide under apex:image - also a typo in there as well