Posted on 04/08/2008 10:31:03
It's a bit tricky, but it can be done. You should, however, be very carefull on how you do it, as it can be very costy in performance.
In your list of orderlines, you make a special tag like this.
... <!--@MyCustomValueTag:<!--@Ecom:Order:OrderLine.ID-->-->
When this is rendered by the module, the HTML will look like this:
<!--@MyCustomValueTag:11-->
So in you PageView.TemplatePage, which is the old template class, you can use a regular expression to match this against the .Output method.
Regex reg = new Regex(@"(<!--@MyCustomValueTag:+)([0-9]+)(-->)+");
The for each match the ID will be in .Groups[2].ToString(). Use this to retrieve the value, and finally parse the tag using:
Template.SetTag("MyCustomValueTag:11", "The custom value");