AntonLV 5 лет назад
Родитель
Сommit
849c7f7bd9

+ 1 - 0
template/designbox_container.html

@@ -0,0 +1 @@
+<div class="bx-page-block-container__class_add__ bx-def-padding-sec-topbottom bx-clearfix" <bx_if:show_html_id>id="__html_id__"</bx_if:show_html_id>>__content__</div>

+ 10 - 1
template/scripts/BxBasePage.php

@@ -367,7 +367,16 @@ class BxBasePage extends BxDolPage
                             $sHiddenOn .= ' ' . $sClass;
 
                 if ($sContentWithBox)
-                    $sCell .= '<div class="bx-page-block-container bx-def-padding-sec-topbottom' . $sHiddenOn . '" id="bx-page-block-' . $aBlock['id'] . '">' . $sContentWithBox . '</div>';
+                    $sCell .= $this->_oTemplate->parseHtmlByName('designbox_container.html', array(
+                        'class_add' => $sHiddenOn,
+                        'bx_if:show_html_id' => array(
+                            'condition' => true,
+                            'content' => array(
+                                'html_id' => 'bx-page-block-' . $aBlock['id']
+                            ),
+                        ),
+                        'content' => $sContentWithBox
+                    ));
             }
             $aVars[$sKey] = $sCell;
         }

+ 9 - 2
template/scripts/BxBaseSearch.php

@@ -110,8 +110,15 @@ class BxBaseSearch extends BxDolSearch
         }
         if ($bOnlyForm)
             return $sForm;
-        
-        return '<div class="bx-page-block-container bx-def-padding-sec-topbottom bx-clearfix">' . DesignBoxContent($sTitle, $sForm, $iDesignBoxTemplate) . '</div>';
+
+        return $this->_oTemplate->parseHtmlByName('designbox_container.html', array(
+            'class_add' => '',
+            'bx_if:show_html_id' => array(
+                'condition' => false,
+                'content' => array(),
+            ),
+            'content' => DesignBoxContent($sTitle, $sForm, $iDesignBoxTemplate)
+        ));
     }
 
     public function getResultsContainer($sCode = '')

+ 15 - 6
template/scripts/BxBaseSearchResult.php

@@ -86,20 +86,29 @@ class BxBaseSearchResult extends BxDolSearchResult
 
     function displaySearchBox ($sContent, $sPaginate = '')
     {
-		$sContent .= $sPaginate;
-		$sMenu = $this->getDesignBoxMenu();
+        $sContent .= $sPaginate;
+        $sMenu = $this->getDesignBoxMenu();
 
         if ($this->id) {
             $sTitle = _t($this->aCurrent['title']);
-        	$sCode = $this->oFunctions->designBoxContent($sTitle, $sContent, $this->iDesignBoxTemplate, $sMenu);
-            return '<div class="bx-page-block-container bx-search-results bx-def-padding-sec-topbottom bx-clearfix" id="bx-page-block-' . $this->id . '">' . $sCode . '</div>';
+            $sCode = $this->oFunctions->designBoxContent($sTitle, $sContent, $this->iDesignBoxTemplate, $sMenu);
+            return $this->_oTemplate->parseHtmlByName('designbox_container.html', array(
+                'class_add' => ' bx-search-results',
+                'bx_if:show_html_id' => array(
+                    'condition' => true,
+                    'content' => array(
+                        'html_id' => 'bx-page-block-' . $this->id
+                    ),
+                ),
+                'content' => $sCode
+            ));
         }
 
         $this->addPageRssLink ();
 
         return array(        	
-        	'content' => $sContent,
-        	'menu' => $sMenu,
+            'content' => $sContent,
+            'menu' => $sMenu,
         );
     }