Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Display related pages based on the category of the current page View modes: 
User avatar
Member
Member
epogburn-nola - 11/19/2011 12:07:44 AM
   
Display related pages based on the category of the current page
I want to display related pages based on the category of the current page. For example, if I have two categories of "foo" and "bar" and the current page I'm viewing is assigned category "foo", I want to show all of the other pages with category "foo" but not "bar." This seems simple, but I can't figure it out using only the portal engine.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 11/23/2011 7:33:12 AM
   
RE:Display related pages based on the category of the current page
Hello.

I can see you have been solving this issue with my co-worker in e-mails. If it helped you somehow, could you please share the solution or the answer with others here on forums? Thank you.

Best Regards,
Radek Macalik

User avatar
Member
Member
epogburn-nola - 11/28/2011 2:47:40 PM
   
RE:Display related pages based on the category of the current page
Actually, this post proved most helpful.

I modified the WHERE statement to render for categories. Now I need to figure out how to grab parent categories...

DocumentID IN ( SELECT DocumentID FROM CMS_DocumentCategory WHERE CategoryID IN ( SELECT CategoryID FROM CMS_DocumentCategory WHERE DocumentID = {%DocumentID%} ))


User avatar
Kentico Support
Kentico Support
kentico_radekm - 12/6/2011 7:15:59 AM
   
RE:Display related pages based on the category of the current page
Hello.

When you run the query you posted over your database and replace {%DocumentID%} macro by proper ID directly, does it return any result?

Best Regards,
Radek Macalik