Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Datfolder permissions

$
0
0
You don't really get entitytokens, the trick is to create them yourself. Suppose the reason why you think you can only get them for IData types is because it has a Extension Method that makes it easy, but there is no magic going on there.

Digging through some more code i ended up in the class AssociatedDataElementProviderHelper and here there is a line of code that shows how to correctly create a AssociatedDataElementProviderHelperEntityToken. As you can see you basically only need the PageId and the Interface Type of the Folder Data.
return new AssociatedDataElementProviderHelperEntityToken(
                TypeManager.SerializeType(typeof (IPage)),
                _elementProviderContext.ProviderName,
                pageId.ToString(),
                TypeManager.SerializeType(interfaceType));
_elementProviderContext.ProviderName is the name of the provider as defined in composite.config.

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>