Hello.
You can do a little customization and ensure requested behavior like this:
1. Extend required document type by 2 additional columns.
Boolean data type (will store info whether given document is marked as favourite or not) and
Text data type (will store user´s name). This can be done in
Site Manager -> Development -> Document types -> Fields tab.
2. Create a custom web part (
http://devnet.kentico.com/docs/devguide/developing_web_parts.htm) or a user control, which will be placed on page template used by documents you want mark as favourite. In code-behind of this web part / user control you will ensure, that when user click „Add to favourites“ bookmark, proper data will be saved into document type´s coupled data table.
So, you will get current node (on which user clicked this option) via this code:
// tree provider
CMS.TreeEngine.TreeProvider provider = new CMS.TreeEngine.TreeProvider(CMS.CMSHelper.CMSContext.CurrentUser);
// get document with specified site, alias path and culture
CMS.TreeEngine.TreeNode node = provider.SelectSingleNode(CMS.CMSHelper.CMSContext.CurrentSiteName, CMS.CMSHelper.CMSContext.CurrentDocument.NodeAliasPath,
CMS.CMSHelper.CMSContext.CurrentDocument.DocumentCulture);
Then you can save proper values into additional columns like this:
Node.SetValue(„<columnName>“,value).Where
columnName is code-name of given field, and value you can get from
CMSContext class (
CMS.CMSHelper.CMSContext.CurrentUser.UserName).
Then, if you want to show documents which are marked as „favourite“ by particular user, you can use simple repeater web part with where condition, and filter result as per user name and „isFavourite“ flag.
Best Regards,
Radek Macalik