This project is read-only.

Dynamic "token" replacement on entire HTML page content

Topics: Customizing Orchard, Writing modules
Mar 19, 2014 at 2:19 AM
We have a client request for custom Orchard functionality to replace existing marketing functionality. The client would like to place dynamic tokens into various content parts (body part, Orchard and Custom widgets, title part, etc.) on a page. The dynamic tokens are dictated by the marketing team and are not present in the Orchard System as their values are pulled from the landing page URL querystring based on the marketing effort.

We have examined the ITokenProvider to see if there was a way to use this to support this functionality, but did not see anyway to implement the token replacement from this area without knowing what the tokens were ahead of time.

We also tried to override the Tokenizer using the Suppress attribute, but in doing so realized (and were told by the compilers) that it created a circular dependency.

We did leverage the IHtmlFilter and we were able to do some of the dynamic token replacement using this functionality, but this did not provide access to the TitlePart or some of our Custom Modules.

Is there some way we can access all of the page content before it is rendered to the browser to do the dynamic token replacement or something like that in order to achieve this?