How To Filter Out Linked Pages?

Greg Laycock asked on April 25, 2017 23:50

I have a number of products in a certain site. These products are in folders which serve as the product categories. In very rare instances, a product crosses two categories, so I'm using a linked page to place the product in both folders. I have a checkbox that can be toggled when adding products which allows a product to be featured on the home page. Currently, if a product which has a linked page is selected to appear on the home page, it appears twice, once for the "real" page and once for the linked page. I would think filtering out this duplicate would be an easy thing, but I've not yet figured it out. How do I go about doing this? (Setting FilterOutDuplicates=true on the repeater does not work.) Thanks!

Kentico 10.0.19 ASPX Template + Portal

Correct Answer

Jan Hermann answered on April 26, 2017 10:04

How do you display them? The main idea is to check if there is any number in the NodeLinkedNodeID property of your page. If there is, it means the page is linked and you can hide it. If you need to check if there is already the original page rendered, you need to compare the NodeLinkedNodeID with exiting NodeID.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Greg Laycock answered on April 26, 2017 14:49

This is exactly what I was looking for. Thank you very much!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.