sachatrauwaen / OpenContent

Structured Content editing for DNN (Dotnetnuke)
46 stars 25 forks source link

Documentation: How to add sort functionality? #58

Closed WillStrohl closed 5 years ago

WillStrohl commented 5 years ago

Is there any documentation on how to add sort functionality to an existing template? I believe that the template I'm currently talking about is based on the Catalog template.

http://www.openextensions.net/templates/open-content/catalog

robsiera commented 5 years ago

Yes, here you'll find all the details https://opencontent.readme.io/docs/sorting

Timo-Breumelhof commented 5 years ago

FYI, I tend to put the order JS files in templates/_Shared so I can share them with other templates

WillStrohl commented 5 years ago

What about a drop down list that end-users can use to change the sort on-demand? I don't think the documentation describes this.

Timo-Breumelhof commented 5 years ago

That documentation is about drag and drop, you can see here @ 5:18 https://www.youtube.com/watch?v=Qu7oNP2vn9I AFAIK there's no drop-down list option ATM. But you could create a separate template with only a list of titles and drag and drop and put that on a separate page.

WillStrohl commented 5 years ago

In a typical listing of "items" on a website, the website visitor could sort them by various attributes. Using e-commerce as an example, you'd be able to sort the visible items by category, price, rating, etc. Are you saying that there isn't documentation or template example to provide this kind of user experience to end-users? If not, do you have any suggestions on where/how I might get started on building that?

Timo-Breumelhof commented 5 years ago

You are right. The documentation is about ordering items by admins. If you want order or filter for users, you can use jplist, or another library in combination with a callback (if needed, wich only a few items I usually just render the items and us JS filtering)

Timo-Breumelhof commented 5 years ago

I changed the documentation, to state that it's about Editors drag and drop..

WillStrohl commented 5 years ago

It's actually built-in and I missed it. 🤦‍♂️