Jump to content

Pagelist order in admin


Frank Vèssia
 Share

Recommended Posts

no because i prefer the tree view instead of a serch list, the serach results are not useful if you want to be fast, if i need a page that start with "a" if my tree is ordered i can be very fast in editing. But the point is to have an ordered list no matter the ways to find a page.

Link to comment
Share on other sites

Actually default sorting is already there:

1. Edit the parent page of the children you want sorted in the admin.

2. Click the "children" tab, and then the "sort settings" link.

3. With the sort settings open, choose the field that you want to sort by. Save.

Now the results will appear in that order in the admin, as well as when you do a children() call from the API. Of course you can always override it from the API by specifying your own "sort=" selector in the children() call. But the method described above is how you setup a default sort for children of any given parent page. This is how they will appear in the Page List.

In my own sites, I use this particular feature all the time. For instance, on news/press items, I always want them reverse chronological according to a date field. In company directories, I sort them by person's name A-Z. And for other pages where I want to control the order with drag-and-drop, I don't set a default order.

Let me know if I've misunderstood your question?

But lets say that you are sorting by a "last_name" field, and it's different from your "title" field. You want "last_name" to appear in the Page List because it will be easier for you to find your pages that way?

1. Go to Admin > Modules > Process > Page List

2. Set the "name of page field to display" to "last_name title". Save.

Now it will display "last_name" in addition to the title for any pages that have that field. For all other pages, it'll display the title, as it does now. You can take this further by entering more field names in that space. This is handy for this theoretical situation, as well as displaying pages with dates (when they have them) along with the title, and other things.

Let me know if this helps?

Link to comment
Share on other sites

This is great feature. But how about sorting page reference list? I think that setting should be on field settings, but cannot find. Should I use "Alternate/custom code to find selectable pages" to get sorting I need?

We have over 30 products and "Related products" field is pretty messy to use.

Link to comment
Share on other sites

If using parent sorting, it should honor the order that is set on that parent. But if using template sorting, I'm not sure that there is an order... I will have to check, but it sounds like there isn't from what you are saying. You are right that there should be, so I will add it.

If you want to use the alternate code, that is another way to do it. In that case, you would just type this in there:

return $pages->find("template=something, sort=title");

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...