I have a search results listing page where every search results are being updated using AJAX. I set a few rendering parameters like the number of results per page on the rendering because they need to vary between pages. Unfortunately, the Current Rendering item is not null only on the first page load, and then returns null with every AJAX request.
I'm trying to find the best way to obtain the parameters if I do not have the rendering item but I can pass eg. Rendering item Id in query string.
I was planning to :
- Pass rendering ID in query string
- Get the rendering item
- Assign current RenderingContext.Current.Rendering to the item from 2
- Invoke the rest of the logic as usual
I don't know how I should retrieve the rendering from ID to be able to assign it. I cannot just get the item because it's Rendering type, not Item type, can you please help? Maybe there is a better way to do it?