Portal Engine
Version 3.x > Portal Engine > Relationships... View modes: 
User avatar
Member
Member
jonnycombs - 11/10/2008 11:36:21 AM
   
Relationships...
I'm attempting to migrate an existing site into Kentico, but I'm confused about how to go about programmatically adding relationships between document types. On my current site I have a large number of products that are related to various other products so that I can display them together on the product landing page (ie. Customers who bought this product also bought...). I've created all the code to import all of my product catalog into kentico, but I can't seem to find an easy way to interact with the Related Docs section of the properties tab. Any help would be appreciated.

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 11/11/2008 6:14:50 AM
   
RE:Relationships...
Hi,

First, I'd like to mention the difference in storing product in KenticoCMS. The products, which E-commerce module works with, are in COM_SKU and related tables, but the product presentation pages are DocumentTypes such as News, etc., and are linked to the SKUs. So it could be possible to have relationships only with the product documents.

In your KenticoCMS installation, there is "Kentico CMS API reference" CHM file. It is also available at

http://devnet.kentico.com/downloads/kenticocms_api.zip

There you could find RelationshipProvider Class, and using the methods from that class, you should be able to programmatically add relationships between your documents. You could find some examples on using other providers to work with documents at

http://devnet.kentico.com/docs/devguide/content_management_internals.htm,

and following articles.

If you won't find that documentation helpful, please let us know if you need more information, and provide us with more details in that case.

Best Regards,
Zdenek Cetkovsky