I was wondering if there was a way to change which view the redirector sent
the 'drilldown' to based on the host name, when someone clicks on a table?
The table would contain three different naming conventions, which equal
three different views.
for example:
For anything named host="qa" there is a qa view.
For anything named host="prod" there is an rmq view.
Thank you!
Absolutely. You would have a ValueSetter module with say a name of "conditional_url"
and three different conditional params. The ValueSetter module's docs go into this briefly (and should have more detail than they do), but you can crib working examples from the hidden testcase view called "testcases_for_value_setter_conditionals".
Anyway, you set the $conditional_url$ key to one of three different values
and then Redirector just has <param name="url">$conditional_url$</param>
Let me give a specific example to show it all. Let's say that upstream we have a Table module with a drilldown, and that's the interaction that sends the user to the right page. Let's say that "host" is one of the fields in that Table.
<module name="ValueSetter">
<param name="name">conditional_url</param>
<param name="if.$row.fields.host$=qa">qa</param>
<param name="default">rmq</param>
<module name="Redirector">
<param name="url">$conditional_url$</param>
<param name="someField">$row.fields.someField.rawValue$</param>
etc...
</module>
</module>
Absolutely. You would have a ValueSetter module with say a name of "conditional_url"
and three different conditional params. The ValueSetter module's docs go into this briefly (and should have more detail than they do), but you can crib working examples from the hidden testcase view called "testcases_for_value_setter_conditionals".
Anyway, you set the $conditional_url$ key to one of three different values
and then Redirector just has <param name="url">$conditional_url$</param>
Let me give a specific example to show it all. Let's say that upstream we have a Table module with a drilldown, and that's the interaction that sends the user to the right page. Let's say that "host" is one of the fields in that Table.
<module name="ValueSetter">
<param name="name">conditional_url</param>
<param name="if.$row.fields.host$=qa">qa</param>
<param name="default">rmq</param>
<module name="Redirector">
<param name="url">$conditional_url$</param>
<param name="someField">$row.fields.someField.rawValue$</param>
etc...
</module>
</module>