1

A client of me is migrating to a new CMS and the old CMS contains placeholders in the content that need to be replaced, something like (bad example ahead): {{ID:CurrentShoppingId}}, which would be replaced with the ID of the current shopper.

I can think of three ways, but I'm totally open to new and better suggestions:

  • Create a new module based on HTML Module. Drawbacks: a module cannot be inherited from, so we have to use the source and alter it, or create a module from scratch;
  • Find out whether there's an event like OnParseHtmlContent and register a delegate;
  • Use the good old (bad) approach of filtering the output response stream.

As far as I know, there's no built-in method in DNN to do this (as opposed to — say — WordPress, where filter upon filter is built).

Abel
  • 56,041
  • 24
  • 146
  • 247

1 Answers1

2

The HTML modules supports limited token replacement. For something more robust there are third party modules available as well. http://www.avatar-soft.ro/dotnetnuke/modules/token-replacement/my-tokens.aspx

notandy
  • 3,330
  • 1
  • 27
  • 35
  • Just what I need. Thanks. I also read that it is possible to create your own token-replacement classes, correct? – Abel Sep 01 '10 at 07:00
  • I am not sure. You may also want to look at PageBlaster, it is a popular module and has a "Powerful Replacement Engine" http://www.snapsis.com/DotNetNuke-Performance-Caching-Compression-Optimization.aspx – notandy Sep 01 '10 at 16:05