M
M
MaxKondratenko2015-05-20 11:37:17
1C-Bitrix
MaxKondratenko, 2015-05-20 11:37:17

On 1s Bitrix, the dynamic area automatically wraps its content in an additional div that spoils the layout of the site, how to get rid of it?

The dynamic area automatically wraps its content in an additional div that spoils the layout of the site.
Found on the site... a solution...
Composite caching needs html containers to insert the contents of dynamic areas into them.
You can use your own containers:

echo '<div id="my_div">';
$frame = $this->createFrame("my_div", false)->begin();
   //динамический контент
$frame->beginStub();
   //заглушка
$frame->end();
echo '</div>';

I have the same ...
<div id="<?=$cartId?>" class="<?=$cartStyle?>">
  <?
  
  $frame = $this->createFrame($cartId, false)->begin();
  
    require(realpath(dirname(__FILE__)).'/ajax_template.php');
  
  $frame->beginStub();
  
    require(realpath(dirname(__FILE__)).'/top_template.php');
  
  $frame->end();
  
  ?>
</div>

But all the same wraps after change of divs in divs... Who faced?
<div id="bx_cart_block1" class="bx_cart_block">


<div id="bx_cart_block1" class="bx_cart_block">
  <!--'start_frame_cache_bx_cart_block1'-->
<a href="/site_sc/personal/cart/"> 
  <i class="fa fa-shopping-cart fa-fw">
  </i> 
  <span class="hidden-sm">
    1 товар | 			1 299 <span class="webdebug-ruble-symbol" title="руб.">a</span>			</span>
</a>

  
<!-- Quick Cart -->
  <div class="dropdown-menu quick-cart" style="display: none;">
    	<!--<div class="qc-row qc-row-heading">
      	<!--<span class="qc-col-qty">шт.</span>-->
    	  <!--  <span class="qc-col-name">1 товар На сумму	    	</span>
      	<span class="qc-col-price">
      		1 299 <span class='webdebug-ruble-symbol' title='руб.'>a</span>	    			    	</span>
      </div>
      -->
      <div id="bx_cart_block1products">
        							<div class="qc-row qc-row-item"> <span class="qc-col-qty"><img src="/upload/resize_cache/iblock/e0a/70_70_1/e0a70a236c73939b8d643bf1f16e92e2.jpg" alt="Подгузники Merries размер L (9-14 кг.) 54шт."></span><span class="qc-col-name"><a href="/site_sc/catalog/7414523739/732062/">Подгузники Merries размер L (9-14 кг.) 54шт.</a></span><span class="qc-col-price">1 x 1 299 <span class="webdebug-ruble-symbol" title="руб.">a</span></span><span class="qc-col-remove bx_item_delete" onclick="bx_cart_block1.removeItemFromCart(228)" title="Удалить"><i class="fa fa-times fa-fw"></i></span></div>
                  <div class="qc-row-bottom">
          <a class="btn qc-btn-viewcart" href="/site_sc/personal/cart/">Корзина</a><a class="btn qc-btn-checkout" href="/site_sc/personal/order/make/">Оформить заказ</a>

      </div>
      </div>
  </div>
<!-- end: Quick Cart -->
<!--'end_frame_cache_bx_cart_block1'--></div>


</div>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
MaxKondratenko, 2015-05-25
@MaxKondratenko

The issue is resolved, I don’t know where it came from, but fortunately the site was not ready and was not filled with content, and everything was decided by reinstalling Bitrix on the server. If anyone suddenly knows where exactly the legs grow from, I will be very grateful for the info.

N
Nikita Samokhvalov, 2015-05-21
@niksamokhvalov

Make up according to BEM , so that there are no problems with Bitrix divas.

A
Alex Khizhniy, 2015-07-22
@mendler

As a solution, if the problem is related to positioning:
div[id^="bx_cart_block1"]{ display: inline; }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question