D
D
dimamoskalenko2016-05-31 01:16:58
Joomla
dimamoskalenko, 2016-05-31 01:16:58

How to make two columns (sidebar + content) in bootstrap for cms joomla?

There was already a similar question on the site ( https://toster.ru/q/138149 )
).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Kumanin, 2016-05-31
@jackkum

<?php $sidebarModule = !!$this->countModules('sidebar'); ?>

<div class="container">
  <div class="row">

  <?php if ($sidebarModule) : ?>
    <div class="col-md-4">
      <jdoc:include type="modules" name="sidebar" />
    </div>
  <?php endif; ?>

    <div class="col-md-<?php echo ($sidebarModule ? 8 : 12); ?>">
      <jdoc:include type="component" />
    </div>

  </div>
</div>

D
dimamoskalenko, 2016-06-08
@dimamoskalenko

Thanks for the reply Evgeny Kumanin .
Doesn't work as expected.
The code that the engine produces:

<div class="container">
    <div class="row">
        <div class="col-md-4">
            <div class="custom"  >
                <div class="sidebar_l">
                    Текст сайдбара
                </div>
            </div>
        </div>
        <div class="col-md-8">
            <div class="item-page">
                <div class="page-header">
                    <h1>Заголовок статьи</h1>
                    <div>Текст статьи</div>
                </div>
            </div>
        </div>
    </div>
</div>

And I would like:
<div class="item-page">
    <div class="page-header">
        <h1>Заголовок статьи</h1>
        <div class="container">
            <div class="row">
                <div class="col-md-4">
                    <div class="custom"  >
                        <div class="sidebar_l">
                            Текст сайдбара
                        </div>
                    </div>
                </div>
                <div class="col-md-8">
                    <div>Текст статьи</div>
                </div>
            </div>
        </div>
    </div>
</div>

How many dances does it take?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question