case 'custom_attribute': $page = $contentObjectAttribute->content(); $zone =& $page->getZone( $params[1] ); $block =& $zone->getBlock( $params[2] ); if ( !$http->hasPostVariable( 'BrowseCancelButton' ) ) { if ( $http->hasPostVariable( 'SelectedNodeIDArray' ) ) { $selectedNodeIDArray = $http->postVariable ('SelectedNodeIDArray' ); $customAttributes[$params[3]] = $selectedNodeIDArray[0]; } //check for other blocks that have browse option enabled and set their source node as well as this one. $existing_custom_attributes = $block->attribute( 'custom_attributes' ); $blocktype = $block->attribute( 'type' ); if($existing_custom_attributes) { $blockini = eZINI::instance( 'block.ini' ); $use_browse = $blockini->variable( $blocktype, 'UseBrowseMode'); if($use_browse) { foreach($existing_custom_attributes as $custom_attr=>$attr_val) { if (isset($use_browse[$custom_attr])&&$use_browse[$custom_attr]=='true') { $customAttributes[$custom_attr] = $attr_val; } } } } $block->setAttribute( 'custom_attributes', $customAttributes ); } break;