M
M
Mikhail Mirgorodsky2019-12-06 13:14:48
Joomla
Mikhail Mirgorodsky, 2019-12-06 13:14:48

How to layout template markup on bootstrap 4 in joomla?

I want to implement the following:

<div class="container-fluid">
  <div class="row">
    <div class="col-md-2">
    </div>
    <div class="col-md-10">
    </div>
  </div>
</div>

but just to have col-md-2 if the empty div was not displayed, and col-md-10 was the full width of the container.
In index.php implement with:
<div class="col-md-2">
        <?php if($this->countModules('right-menu')) : ?>
        <div class="right-menu">
      <jdoc:include type="modules" name="right-menu" style="xhtml" />
        </div>
           <?php endif; ?>
          </div>
    <div class="col-md-10">
<jdoc:include type="component" />
</div>

it doesn't work because the size col-md-10 is hardcoded

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MasterMike, 2019-12-07
@PiZZaDoXa

Good afternoon!
Do you have a condition, is col-md-2 empty, does it come from the server like this?
Well, show this block depending on the condition.
And for the next block, set the class col-md-10 or col-md-12 depending on the same condition.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question