Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Custom Web Part View modes: 
User avatar
Member
Member
schebiyyam-allianceglobalservices - 5/4/2012 7:04:49 AM
   
Custom Web Part
I have a project requirement to create a Custom Web Part and pull the data into this Custom Web Part from Custom Document Type or Another Web Part. Please suggest me the methodologies, links and sameple if you know.

Thanks in advance

User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 5/4/2012 9:06:13 AM
   
RE:Custom Web Part
Hello.

Regarding custom web part development, please refer to http://devnet.kentico.com/docs/6_0/devguide/developing_web_parts.htm.

Regarding API for working with documents, please refer to http://devnet.kentico.com/docs/5_5R2/devguide/selecting_nodes.htm

If you could clarify what exactly you need, we can provide more accurate answer. Thank you.

Best Regards,
Radek Macalik

User avatar
Member
Member
schebiyyam-allianceglobalservices - 5/5/2012 5:49:23 AM
   
RE:Custom Web Part
Hi Redek Macalik,

Thanks for the info.

In the second link, I noticed following statement to fetch data from Products.

ds = tree.SelectNodes("CorporateSite","/Products/%", "en-us", True, "cms.menuitem;cms.products");

The above statement is working fine,

But suppose if want to fetch data from second level node, for example from Smart Phones (/Products/Smart), then the following statement is not working:

ds = tree.SelectNodes("CorporateSite","/Products/Smartphones/%", "en-us", True, "cms.menuitem;cms.products");

Could you please suggest alternate to fetch the data from second level nodes?


User avatar
Member
Member
kentico_michal - 5/6/2012 7:06:08 AM
   
RE:Custom Web Part
Hi,

Have you checked all tables of the data set retrieved by the SelectNodes method? I am asking you because by default, documents are stored in different data tables based on the document type. For example, cms.menutitem documents are stored in the ds.Tables[0], whereas documents of cms.products document can be found in the ds.Tables[1].

You can change this behavior by setting the MergeResults property of the TreeProvider to true before you execute the SelectNodes method:

tree.MergeResults = true;

As a result, all document are merged into one data table ds.Tables[0].

Best regards,
Michal Legen