I took the latest Foundation code. Check out the following code sample:
public class HomeController : PageController<HomePage>
private readonly IContentRepository _contentRepository;
private readonly ReferenceConverter _referenceConverter;
public HomeController(IContentRepository contentRepository, ReferenceConverter referenceConverter)
_contentRepository = contentRepository;
_referenceConverter = referenceConverter;
public ActionResult Index(HomePage currentContent)
var someVariant = _contentRepository.Get<GenericVariant>(_referenceConverter.GetContentLink("SKU-39813617"));
var writable = someVariant.CreateWritableClone<GenericVariant>();
var readonlyHome = currentContent;
var writableHome = (HomePage)currentContent.CreateWritableClone();
Note that when working with CMS content writable clone IsModified state is False right after creation which is correct, however for catalog content writable clone has IsModified set to True right after creation.
This looks like a bug in CreateWritableClone implementation in CatalogContentBase.