Gradient on two or more rectangles

Hi there! How do I add a gradient to different rectangles on different pages? Duplicating code with changing the ID of the object does not help.

Hi @Ihor_Vorobiov maybe custom code from this question might be of help to you?

Background gradient