Sep 25, 2013 at 2:04 AM
Edited Sep 25, 2013 at 2:05 AM
I need to inject parameter values obtained from a database into the href of various anchor tags in the HTML of a Page content type.
<p><a href="MyUrl?MyParameter1=MyParameterValue1" target="_blank"> </a></p>
A new tab should open for each link and display only the contents of the page at the specified URL (i.e., no content from the Orchard site). I need to know when the page is rendered so that I can execute some code to obtain each parameter value from a database
and then replace the its token (e.g., MyParameterValue1) with the actual value.
What is the best way to do something like this in Orchard?
I tried creating a custom module with a razor view that renders the above anchor tag as the return shape of the Display method of the module's ContentPartDriver, but it just displays its URL in the content area of a new page in the context of the Orchard site
and waits for a user to click on the link.