 2012-06-19 01:09 | Witam.
Gdy w pliku actions_client/p.php deklaruje menu tak aby można było używać je w szablonach stron (page_...), przestaje działać zmienna $aData[sBanner].
Czy można jakoś rozwiązać ten problem tak aby pozostały deklaracje menu w p.php?
Podobnie niepoprawnie działają wtedy zmienne związane z <!-- PAGES_TREE -->
pozdrawiam » Quick.Cms v2.x |
 2012-06-19 08:48 | dlatego sie tak dzieje bo nadpisujesz zmienna $aData. Przeslij kod od pliku actions_client/p.php i cos postaram sie poradzic |
 2012-06-19 10:05 | Kod jest standardowy z dodanymi zmiennymi menu:
<?php if( isset( $iContent ) && is_numeric( $iContent ) ){
$menuGlowne1 = $oPage->throwMenu( 'menuGlowne.tpl', 4, $iContent, 0 ); $menuGlowne2 = $oPage->throwMenu( 'menuGlowne.tpl', 5, $iContent, 0 ); $menuGlownePion1 = $oPage->throwMenu( 'menuGlownePion.tpl', 4, $iContent, 0 ); $menuGlownePion2 = $oPage->throwMenu( 'menuGlownePion.tpl', 5, $iContent, 0 );
$aData = $oPage->throwPage( $iContent ); if( isset( $aData ) ){ if( !empty( $aData['sUrl'] ) ){ header( 'Location: '.$aData['sUrl'] ); exit; }
if( !empty( $aData['sTemplate'] ) ) $oTpl->setFileAlt( $config['default_pages_template'] ); else{ if( $config['inherit_from_parents'] === true && !empty( $aData['iPageParent'] ) ){ $aDataParent = $oPage->throwPage( $aData['iPageParent'] ); if( !empty( $aDataParent['sTemplate'] ) ){ $aData['sTemplate'] = $aDataParent['sTemplate']; $oTpl->setFileAlt( $config['default_pages_template'] ); } } if( empty( $aData['sTemplate'] ) ) $aData['sTemplate'] = $config['default_pages_template']; }
if( !empty( $aData['sTheme'] ) ) $sTheme = $aData['sTheme']; else{ if( $config['inherit_from_parents'] === true && !empty( $aData['iPageParent'] ) ){ if( !isset( $aDataParent ) ) $aDataParent = $oPage->throwPage( $aData['iPageParent'] ); if( !empty( $aDataParent['sTheme'] ) ) $sTheme = $aDataParent['sTheme']; } }
if( !empty( $aData['sMetaKeywords'] ) ) $sKeywords = $aData['sMetaKeywords']; if( !empty( $aData['sMetaDescription'] ) ) $sDescription = $aData['sMetaDescription']; if( empty( $aData['sDescriptionFull'] ) ) $aData['sDescriptionFull'] = $aData['sDescriptionShort'];
$aData['sPagesTree'] = $oPage->throwPagesTree( $iContent );
$sTxtSize = ( $config['text_size'] == true ) ? $oTpl->tbHtml( $aData['sTemplate'], 'TXT_SIZE' ) : null; $sPagesTree = !empty( $aData['sPagesTree'] ) ? $oTpl->tbHtml( $aData['sTemplate'], 'PAGES_TREE' ) : null; $sPages = isset( $aData['sPages'] ) ? $oTpl->tbHtml( $aData['sTemplate'], 'PAGES' ) : null; $sBanner = !empty( $aData['sBanner'] ) ? $oTpl->tbHtml( $aData['sTemplate'], 'BANNER' ) : null; $sTitle = strip_tags( ( !empty( $aData['sNameTitle'] ) ? $aData['sNameTitle'] : $aData['sName'] )); $sSubpagesList = null;
$aData['sDescriptionFull'] = changeTxt( $aData['sDescriptionFull'], 'nlNds' );
if( $aData['iSubpagesShow'] > 0 ){ if( $aData['iSubpagesShow'] < 3 ) $sSubpagesList = $oPage->listSubpages( $iContent, $aData['sTemplate'], $aData['iSubpagesShow'] ); }
$aImages = $oFile->listImagesByTypes( $aData['sTemplate'], $iContent ); $sFilesList = $oFile->listFiles( $aData['sTemplate'], $iContent );
$oTpl->unsetVariables( ); $content .= $oTpl->tbHtml( $aData['sTemplate'], 'CONTAINER' ); } else{ $sTitle = $lang['404_error'].' - '; $content .= $oTpl->tbHtml( 'messages.tpl', 'ERROR' ); } } ?>
|
 2012-06-20 07:24 | zaraz za kodem: $menuGlowne1 = $oPage->throwMenu( 'menuGlowne.tpl', 4, $iContent, 0 ); $menuGlowne2 = $oPage->throwMenu( 'menuGlowne.tpl', 5, $iContent, 0 );
$menuGlownePion1 = $oPage->throwMenu( 'menuGlownePion.tpl', 4, $iContent, 0 ); $menuGlownePion2 = $oPage->throwMenu( 'menuGlownePion.tpl', 5, $iContent, 0 );
dodaj: $oTpl->unsetVariables( ); |