You need to sign in to do that
Don't have an account?
Changing the Static Resource(image) name dynamically -
I have a sites pages that has the following line of code that have image.
<apex:page showHeader="false">
<apex:image id="Holidays" value="{!$Resource.default1}" width="220" height="55" />
I want to change the images based on the field value in the ojbect.
My custom object name holidays__c. Custom page titled holidayspecialpage.
with custom field season__c. I have a custom controller and page works fine on sites page.
I want to change the image in my apex page based on the value of season__c
if(season__c = summer) static resouce summer image.
How can I acheive this?
How dynamic are the static resources that you want to use?
A quick hack I could think of is to include all the resources on your page, but use the rendered attribute on the apex:image tag to determine whether or not the image should be shown.
All Answers
How dynamic are the static resources that you want to use?
A quick hack I could think of is to include all the resources on your page, but use the rendered attribute on the apex:image tag to determine whether or not the image should be shown.