I'm adding a "These items might also interest you" block to
of my pages and came up with filling a custom zone for it with the shape(s) needed from inside an ActionFilter using something like this:
Now, I have the problem that I'm doing the work to render that premiumBlockShape on all requests (actions) that return a ViewResult although on some pages I won't ever render that shape.
The only way
I see right now to solve this problem is doing all the work from
inside the shape
template which itself will only be processed if the containing zone is actually rendered. But it feels awkward to do all the heavy lifting from
inside a View
How would you go about this? Any other ideas?