load(); if( $parentAssembly->isValid() ) { $_REQUEST['parent_content_id'] = $parentAssembly->mContentId; $_REQUEST['show_empty'] = true; $gBitSmarty->assign( 'parentAssembly', $parentAssembly ); } } else { $_REQUEST['show_empty'] = true; $_REQUEST['no_thumbnails'] = true; } if (!empty($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id'])) { if( $_REQUEST['user_id'] == $gBitUser->mUserId ) { $_REQUEST['show_empty'] = true; } $gBitSmarty->assign('gQueryUserId', $_REQUEST['user_id']); $template = 'user_galleries.tpl'; } else { $template = 'list_assemblies.tpl'; } $galleryList = $gStockAssembly->getList( $_REQUEST ); $gStockAssembly->invokeServices( 'content_list_function', $_REQUEST ); $_REQUEST['listInfo']['parameters'] = array_filter( [ 'user_id' => !empty( $_REQUEST['user_id'] ) ? (int)$_REQUEST['user_id'] : '', 'gallery_id' => !empty( $_REQUEST['gallery_id'] ) ? (int)$_REQUEST['gallery_id'] : '', ] ); $gBitSmarty->assign( 'listInfo', $_REQUEST['listInfo'] ); $gBitSmarty->assign( 'galleryList', $galleryList ); $gDefaultCenter = "bitpackage:stock/$template"; $gBitSmarty->assign( 'gDefaultCenter', $gDefaultCenter ); $gBitSystem->display( 'bitpackage:kernel/dynamic.tpl', 'List Assemblies', [ 'display_mode' => 'list' ] );