Monday 29 October 2007 2:25:43 am
Thanks Łukasz, I'll just document this for anyone else who might need it... [EZ 3.10.0] A custom (or existing) class that acts as an information collector has several redirect possibilities: <b>1.</b> Displaying a "result" template (eg poll result), typically located in <i>[Design-Extension]/templates/content/collectedinfo/</i> <b>2.</b> "Redirect" to a specific URL (for all objects of that class) <b>3.</b> Redirect back to the content node ("Node") method. Setting up information collection for a custom class involves creating settings for it in (eg) <i>settings/override/collect.ini.append.php</i>. Information about settings can be seen in <i>settings/collect.ini</i> My question was about getting something like option 2 (above) to go to a dynamic URL, as I set in a template file. Lucasz's suggestion is to use option 1 and then create a redirect in the template loaded by that option. So, collect.ini.append.php (eg, other options left out)
[InfoSettings]
TypeList[my_infocollector_class]=my_infocollector_class
[DisplaySettings]
DisplayList[my_infocollector_class]=result
And, in <i>[Design-Extension]/templates/content/collectedinfo/my_infocollector_class.tpl</i>
{* redirect to another node *}
{set-block scope=root variable=redirect_to_node_id}2{/set-block}
This then opens up opportunities for setting a variable redirect, perhaps using
- relative location (eg parent)
- last visited node
- value from template - Get/Post value @Heath .. yes, there seem to be some similar features to login redirection - ie RedirectURLAttribute, though I haven't experimented with this and there seems to be no documentation yet. Thanks to you both. Hope this helps others.
|