Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Select Distinct View modes: 
User avatar
Member
Member
DahlinDev - 7/3/2012 9:28:08 AM
   
Select Distinct
I have a folder that I have added a bunch of document types under to act as a repository.

Folder
- Doc A
- Doc B
- Doc C
- .....



I then have some pages not under that folder that I link documents under.

ie.
Page1
(link) Doc A
Page 2
(link) Doc A
(link) Doc C



These pages are under a Category page.

On the category page I want to display a list of linked docs that are used by the pages below it. I only want to display a doc once even if it is used by mulitiple pages. I also want to oder the docs by the nodeorder set in the Folder(repository).

Does anyone know how I can acheive this?


User avatar
Member
Member
bowens - 7/3/2012 9:52:24 AM
   
RE:Select Distinct
For the sorting, I believe you can order by "nodelevel, nodeorder" which will take first the depth of the tree and then order by each subtree.

In order to remove dupes from your list, if you are using a standard repeater webpart, there is a property for "filter out duplicate documents" that you can check that will hopefully give you what you need.

-Brandon


User avatar
Member
Member
DahlinDev - 7/3/2012 11:03:29 AM
   
RE:Select Distinct
For the Distinct that worked perfectly. However the sort didn't work out. I ended up adding another field on the document type, CategoryOrderWeight as an int. They'll have to weight the document as how it should be ordered when on the Category page.

So then I have Order By Expression: CategoryOrderWeight DESC

Thanks for the tips, really helped.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/3/2012 4:43:20 PM
   
RE:Select Distinct
Hi,

If you want to have the same order of the items as in CMS Desk, you can take a look on this FAQ.

Best regards,
Juraj Ondrus