Try our conversational search powered by Generative AI!

Retreive a media




With the new system how can I retreive a media if I know his type and his name? I suppose that I can do the following:

contentRepository.Get<PolyolefinsMedia>(new ContentReference(XXX))

But how can I retreive my contentReference by knowing the type and name?



Feb 04, 2014 15:45

Since you can have several items with the same name and type, this becomes a bit tricky. I guess you can use EPiServer Find or loop though the children if you know what folder the item exists in.

Feb 04, 2014 16:24
* 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.