add several subtree notifications from one single form

Author Message

Mickael Robin

Wednesday 17 September 2008 9:01:50 am

As explained in this topic ( http://ez.no/developer/forum/developer/notifications_based_on_fetch_result_instead_of_subtree ) I am trying to propose my users to add notifications to a collection of items which don't belong to the same subtree.

To be more specific, I try to propose to set up an <b>"e-mail alert" on the results of a mutli-criter filter</b> that I will manage thanks to a mix of attribute filter and view parameters.

Then, the most simple solution seems to propose to add notifications to the group of (parent) nodes that will result form my filtered fetch...

Unfortunately, <b>I do not manage to modify the "Add to notifications" process to add several notifications nodes from a single form.</b>

Natively, it seems that the POST form (1) posts a single node_id to the file kernel\content\action.php (2) which calls the file kernel\notification\addtonotification.php

(1)

<form method="post" action={'/content/action'|ezurl}>
<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="submit" name="ActionAddToNotification" value="Keep me updated" />
</form>

(2)

else if ( $http->hasPostVariable( "ActionAddToNotification" ) )
{
    $nodeID = $http->postVariable( 'ContentNodeID' );
    $module->redirectTo( 'notification/addtonotification/' . $nodeID . '/' );
    return;

So, I tried to replace the single value of the form with an array of values ; and to do a foreach loop in the addtonotification.php file but I just can't have this tweak running.

=> am I on the right tracks?
=> shall I use anoter form type to pass the array of values?
=> what is the best way to perform the foreach loop within the addtonotification.php file?

Thanks in advance for your help :-)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.