Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add New Item to ListPart at the Top by Default #16052

Open
jaliao opened this issue May 14, 2024 · 8 comments
Open

Add New Item to ListPart at the Top by Default #16052

jaliao opened this issue May 14, 2024 · 8 comments
Milestone

Comments

@jaliao
Copy link

jaliao commented May 14, 2024

Dear Orchard Core Team,

I hope this message finds you well.

I would like to request a feature enhancement for the ListPart in Orchard Core. Currently, when adding a new item to the ListPart, it is appended to the bottom of the list. However, I would find it extremely useful if there were an option to have new items automatically positioned at the top of the list by default.

This feature would significantly improve the workflow for users who often need to prioritize the most recent entries.

Thank you for considering this request. I appreciate all the hard work the team puts into making Orchard Core a fantastic platform.

Best regards,
Justin Liao

@Piedone
Copy link
Member

Piedone commented May 14, 2024

List Part is mostly about structuring a content relationship, but you don't necessarily need to list content items how it does by default (but e.g. you can use Queries).

What's your use case, specifically? Where do items appear at the bottom of the list?

@MikeAlhayek
Copy link
Member

This could be a good option to add to the setting of the BagPart. By default we add item at the end, but with the new options we can change the behavior.

@Piedone
Copy link
Member

Piedone commented May 14, 2024

For Bag Part I'd understand, but this issue is about List Part so I'm a bit unclear about the use case.

@MikeAlhayek
Copy link
Member

oh I read it "BagPart" lol. I am not sure what is that ask then.

@jaliao
Copy link
Author

jaliao commented May 15, 2024

There is a Content Type "Product" in the backend that uses ListPart with the Order sorting feature enabled. There are several records inside, and when a new record "Watch 123" is added, it is placed at the end by default. We hope to have the new data sorted at the top by default.
image

@jaliao
Copy link
Author

jaliao commented May 15, 2024

Although there are queries available, we hope to use the Order field of the List Part as the basis for sorting. Currently, the Order number of newly added items is the largest number.

@MikeAlhayek
Copy link
Member

I can't remember out of the top of my head, but there is a sort filter on contents that you can sort by updated as descending/ascending. I think the same filter exists when list part is used.

@sebastienros
Copy link
Member

Internally it's incrementing a counter (Order). This doesn't have to change. But ordering options in the display (and the services) would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants