User:Romney yw/Drafts/Sorting

In category lists, pages sort by default alphabetically in ascending order by page title.

This default order can be overridden (e.g. so that biographical articles titled Forename Surname can be sorted by Surname, Forename) either by using the "pipe-trick", or by specifiying the DEFAULTSORT magic word.

In such cases, I prefer use of the DEFAULTSORT magic word.

The "pipe-trick" only relates to the individual category entry to which it is attached. Articles with multiple categories must have the pipe repeated for each category specified - which is both cumbersome and subject to error. I have found a number of articles (now fixed!) where the pipe had not been applied consistently to every category listed, leading to potential confusion arising from differing sort orders in different categories.

If an article has been tagged with one or more templates (e.g. cleanup, copyedit, sections, trivia, importance, POV, unreferenced, wikify, and many others), it will automatically be included in one or more categories to assist with future maintenance of the article. As the "pipe-trick" cannot be applied to such "automatic" categories, the article will appear in these categories sorted naturally under page title, again leading to potential confusion. However, if the DEFAULTSORT magic word has been specified, the article appears in the specified DEFAULTSORT order in all automatic categories, as well as any categories specified explicitly in the article.

In summary, I think any article (such as a biography) which is conventionally sorted in a different way to the natural order by page title should always have DEFAULTSORT specified, even if no categories have been specified explicitly. This ensures a consistent sort order for any automatic categories, and facilitates the subsequent explicit categorisation of the article.

The only use therefore for the "pipe-trick" is where an article needs to be sorted differently in a particular indivdual category. For example, you may wish to sort book articles chronologically by year of publication in one category, while maintaining alphabetical order by title in other categories. I think such use is likely to cause confusion and should only be used sparingly and with some care.

And now for listas .....