Retreive a media

Vote:
 

Hello,

 

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?

 

REgards,

#80900
Feb 04, 2014 15:45
Vote:
 

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.

#80904
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.