D
D
Darklt2016-11-15 17:28:01
1C-Bitrix
Darklt, 2016-11-15 17:28:01

HTML sorting of bitrix.news how to do it manually?

We have a news component, how to add sorting by date and number of views to the Html template?
kind

<a href="?sort=">По количеству просмотров </a> и <a href="?sort=">По дате  </a>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Zakharov, 2016-11-15
@konratnox

pass in get parameters, on the page with the component call, check them and send them to the parameters of the
Update component:
yes, you can do it in different ways, an example with pagination
in the component template
on the page with the component call
and in the component parameters, we pass
it with sorting in the same way, only additional checks and take into account the current sorting direction

S
Sergey, 2016-11-17
@gangstarcj

Ready-made examples in the documentation, the first link in Google

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question