Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

How to get image name using id in dojo


Hi All, 

I am new to episerver CMS. I am creating a custom widget using dojo for repetable image selector (Text box with a browse button to Media). I need to get the image name from dojo using the image id. Can anyone help me?

Nov 25, 2015 11:10

You can use the Dojo object stores that Episerver provides as JS APIs.

Here is the article from the CMS UI documentation that describes the stores:

You would be using the epi.cms.contentdata store to retrieve data on the image using it's content reference (assuming that is what you are referring to when you say image id).

It should look something similar to this:

var registry = dependency.resolve(""),
    store = registry.get("epi.cms.contentdata"),
    query = store.query({
        id: 3,
        language: "en"
query.observe(dojo.hitch(this, this.onChange));
query.then(function(results) { = results;
Edited, Nov 30, 2015 16:42

Hi Matthew,

I will look in to it. Hope it will be very helpful for me.

Thank you.

Edited, Dec 01, 2015 8:16
Dec 22, 2015 16:32
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.