Custum ordering of selected documents

Mateusz Żebrowski asked on October 16, 2015 08:58

I have following scenario: I need to create mechanism (I think some kind of form control) which works like this:

  1. User choosing let's say products from all products from his web site tree.
  2. User change order of products.
  3. System displaying products (via repeater or anything else) in the same order as user apply in step 2.

This form control will be used to set web part property or page type field and each time order will be different, so I can't add to product new filed for ordering (then it will be globally). Is it possible to create this mechanism using Uni Selector and uni grid (and how)? If not is there any in-box Kentico tools that can help?

Recent Answers

Brenden Kehren answered on October 16, 2015 23:23

So when you say they change the order, is this then reflected in the content tree or just for this instance of a repeater? If it is for the repeater, which I'm guessing it is, then you might need to create a separate reference table that has a few ID's and an order number in them, maybe grouped by a unique ID for that webpart/page. For every page or page template you'd need this order reference.

0 votesVote for this answer Mark as a Correct answer

Mateusz Żebrowski answered on October 19, 2015 07:42

So you suggest to create coustom table with three columns 1. Webpart/page ID 2.Product ID 3.Order? and then repeater wolud be read data from this table and display on page right? Wirte back if I understand correctly?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 22, 2015 14:48

I think you'd need would be:

  • the webpart id,
  • the parent node id or alias path like /Page-1/sub-page/%,
  • product or node id,
  • product document id (so you can use GetDocumentURL(DocumentID) to get URL)
  • order.

Then you'd have to create a custom inner join query on those page types using that custom table and order by your custom order field.

0 votesVote for this answer Mark as a Correct answer

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