1

We have a package that we install in another org. In this package I look-up to a static resource (an image) and load it on my visualforce page. Something like this:

<img src="{!$Resource.Logo}" />

Doing it this way, we always have the same logo in the org we install our package (the logo that is included as a static resource in our package). How can I make it dynamic?

So maybe we in our package we look-up to a static resource that doesn't exist in the package but will be available in the org we install into, so we can modify that logo (static resource) on that org.

If not possible, is there another way that I can achieve this? So I load a static resource, but I can modify it in different orgs to be a different image...

Update:

Just to make it clear, both static resource and page are in a managed package and I want to show a different image in different orgs that I install my package.

2
  • 1
    I'm not sure you mean truly dynamic here - if I'm understanding correctly, you just want to alter the image that the page points to? Is the VF page in the package or in the destination org? If it's in the org or if the package is unmanaged/allows you to modify the markup, just point the image source to a different static resource Commented Nov 17, 2016 at 18:38
  • As you said what I mean is just to be able to change that image. My issue is that my page and my static resource are both in a managed package and I want a solution for being able to change it in destination org. So I install my package in different orgs and they all will see a different image @BrianMansfield
    – ashkanent
    Commented Nov 17, 2016 at 18:44

1 Answer 1

0

There is a similar question here: Accessing Local Static Resources from a Managed Package

So if you are using that URL pattern listed there to access a static resource, you basically just have to instruct the user to save their logo to a local static resource with a specific defined name.

Another idea could be to have a user-editable Custom Setting in the managed package which contains the relative URL of whatever Static Resource (or File, or Attachment, or Document) they want to use for an image. You default it to your own logo, and then if they want to change it, you provide instructions for doing so.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .