V
V
Vitaly2019-03-06 12:00:31
1C-Bitrix
Vitaly, 2019-03-06 12:00:31

How to forward data from $_SERVER['REQUEST_URI'] to the component template past the cache?

Task: It is necessary to parse the $_SERVER['REQUEST_URI'] variable in the catalog.section template for the presence of the required utm tag, if it exists, modify the component (replace one element in the array).
My actions: in result_modifier.php I read $_SERVER['REQUEST_URI'], if there is a label, I delete one element, I put another one. Everything works until you turn on the cache. with cache enabled as far as I know result_modifier is not processed, $_SERVER['REQUEST_URI'] is not even printed. composite cache is not used.
Tell me how to forward data from $_SERVER['REQUEST_URI'] to the component template?
The task is solved in component_epilog.php + js but I would like to do it in php

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2019-03-06
@gromdron

The task is solved in component_epilog.php + js but I would like to do it in php

This is the simplest and most harmless solution.
I would start from the task, most likely either you are doing something wrong, or this is really an exceptional situation, and in this case, I would take the component to local, process $_SERVER['REQUEST_URI'] and add it to the caching keys.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question