Try our conversational search powered by Generative AI!

Intercepting all rendered output from Episerver



I am wanting to introduce a few tokens to my blocks, such as #name#.  At runtime, I'd like the ASP.NET MVC system to find all tokens within the markup being output and replace them with dynamic values from an internal API.

Is there a good spot to intercept the rendering of all blocks in a bulk way so that I don't have to code this logic all over the place?

Sep 22, 2020 16:17

If you want to replace the tokens when the content is requested (not just saved for the first time) you could create an http handler.

Sep 23, 2020 4:50

You can create custom MVC ActionFilter and override OnResultExecuting to achieve this.

Sep 23, 2020 6:51
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.