Answer the question
In order to leave comments, you need to log in
What is the best way to implement the Bitrix component?
Good afternoon. There is a rather strange requirement, but still:
- the component must receive data from a remote server, save it to the infoblock, and then display it.
I have 2 options how to do this:
1) Get the data, save it, display it via CIBlockElement::GetList
2) Get the data, save it, put a call to the standard news:list with a correctly set filter into the custom component template.
Answer the question
In order to leave comments, you need to log in
You must have a service (page, component, whatever) that will download data from a remote server and save it to an infoblock. The output will already be handled by a standard component.
If the data needs to be loaded as needed, then you can get by with an AJAX (go CURL if their code) request to the service before displaying (or calling a component that will actually load the data), otherwise CRON.
PS no one forbids you to make a component that will not display anything, but will only load data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question