A
A
Alexander2020-04-13 13:19:15
1C-Bitrix
Alexander, 2020-04-13 13:19:15

What is the best way to implement the output and sorting of users?

It is necessary to display a list of users with the ability to sort users by the full name field.
An example of what it should look like 5e943c6e0e896311405393.png

Please advise how best to implement the display and sorting of users. Standard NEWS and CATALOG components work with infoblocks. That is, it will be necessary to create your own component based on the NEWS component, which will take a list of users through the Bitrix API?

The second question sorting sorting how best to do? So that when you click on the Name field, the component displays a list sorted by name? Do ajax loading sorted data on click?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PetrPo, 2020-04-13
@PetrPo

A fairly general question, without clarification.

That is, it will be necessary on the basis of the NEWS component ...

Yes, you can write your own component, you can see how news.list is made, but the database queries will be different. Do you need a cache, a page?
So that when you click on the Name field, the component displays a list sorted by name? Do ajax loading sorted data on click?

ajax or not is up to you. If you are already writing your own component, do it in a bitris-like way through the AJAX_MODE parameter. You also pass sorting through a parameter, and you pass it from a parameter to a request. How to change sorting several options when clicking, if you want to substitute in get, if you want to write in cookies, maybe you want more through the session, a lot of options ...
Or you can google a little and here, for example, there is a ready-made component on the marketplace link (I didn’t test it myself, but you can at least see an example)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question