diff --git a/packages/ezflow_extension/ezextension/ezflow/datatypes/ezpage/ezpagetype.php b/packages/ezflow_extension/ezextension/ezflow/datatypes/ezpage/ezpagetype.php index df307fbf..52a8f362 100644 --- a/packages/ezflow_extension/ezextension/ezflow/datatypes/ezpage/ezpagetype.php +++ b/packages/ezflow_extension/ezextension/ezflow/datatypes/ezpage/ezpagetype.php @@ -781,12 +781,9 @@ function customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribut 'value' => $contentObjectAttribute->attribute( 'id' ) ), 'from_page' => $redirectionURI, 'cancel_page' => $redirectionURI, - 'persistent_data' => array( 'HasObjectInput' => 0 ) ); - - if( $blockINI->hasVariable( $block->attribute( 'type' ), 'ManualBlockStartBrowseNode' ) ) - { - $browseParameters['start_node'] = $blockINI->variable( $block->attribute( 'type' ), 'ManualBlockStartBrowseNode' ); - } + 'persistent_data' => array( 'HasObjectInput' => 0 ), + 'start_node' => $this->getBrowseStartNodeId( $http, $blockINI, $contentObjectAttribute, $block, $params ), + ); eZContentBrowse::browse( $browseParameters, $module ); break; @@ -1247,6 +1244,32 @@ function unserializeContentObjectAttribute( $package, $objectAttribute, $attribu $xmlString = $rootNode ? $rootNode->ownerDocument->saveXML( $rootNode ) : ''; $objectAttribute->setAttribute( 'data_text', $xmlString ); } + + /** + * @param eZHTTPTool $http + * @param eZINI $blockIni + * @param eZContentObjectAttribute $contentObjectAttribute + * @param eZPageBlock $block + * @param array $params + * @return int|null + */ + protected function getBrowseStartNodeId( $http, $blockIni, $contentObjectAttribute, $block, $params ) + { + $return = null; + + if( $http->hasVariable( 'start-browse-node-id' ) ) + { + $startBrowseNodeIds = $http->variable( 'start-browse-node-id' ); + $return = $startBrowseNodeIds[ $contentObjectAttribute->attribute( 'id' ) ][ $params[1] ][ $params[2] ]; + } + + if( !$return && $blockIni->hasVariable( $block->attribute( 'type' ), 'ManualBlockStartBrowseNode' ) ) + { + $return = $blockIni->variable( $block->attribute( 'type' ), 'ManualBlockStartBrowseNode' ); + } + + return $return; + } } eZDataType::register( eZPageType::DATA_TYPE_STRING, "ezpagetype" ); diff --git a/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl b/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl index 5924f246..73561ec7 100644 --- a/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl +++ b/packages/ezflow_extension/ezextension/ezflow/design/standard/templates/block/edit/edit.tpl @@ -157,6 +157,9 @@ {/if} {if and( not( $is_dynamic ), not( $is_custom ) )}
+ {if ezini( $block.type, 'ManualBlockStartBrowseNode', 'block.ini' )} + + {/if}
{/if}