Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

How to know what "actual type" of VariationContent I will get?

$
0
0

Hi,

When I have a variation Code and I want to retrieve its Content, I do this:


var ref = GetCatalogEntryReferenceFromEpi(variationCode);
var content = _contentLoader.Get<VariationContent>(ref, LanguageSelector.AutoDetect(true));

...

This works... but, I'd don't really want type VariationContent.  I want a derived type such as ShirtVariationContent, SneakerVariationContent, etc... But I don't know what type it will be -- because I only have the Code...

What is the recommended way to "know"& get the actual derived type from IContentLoader?


Viewing all articles
Browse latest Browse all 8020

Trending Articles