anydigital / drupal-tweme

Ultra lightweight Bootstrap theme for Drupal.
https://www.drupal.org/project/tweme
62 stars 9 forks source link

How to change sidebars order? #20

Closed hopfrogsalerno closed 9 years ago

hopfrogsalerno commented 9 years ago

How do I modify the structure? I want to have this: content | sidebar first | sidebar second The section is this but I has not succeeded there. How to do? Thanks

<section class="main zone">
  <div class="container">
    <div class="row">
      <?php $_content_cols = 12 - 3 * !empty($page['sidebar_first']) - 3 * !empty($page['sidebar_second']) ?>
      <section class="main-col col-md-<?php print $_content_cols  ?><?php print !empty($page['sidebar_first']) ? ' col-md-push-3' : '' ?>">
        <?php print $messages ?>
        <?php print render($page['help']) ?>
        <?php print render($page['highlighted']) ?>
        <?php print render($page['content']) ?>
      </section>
      <?php if (!empty($page['sidebar_first'])): ?>
      <aside class="main-col col-md-3 col-md-pull-<?php print $_content_cols  ?>">
        <?php print render($page['sidebar_first']) ?>
      </aside>
      <?php endif ?>
      <?php if (!empty($page['sidebar_second'])): ?>
      <aside class="main-col col-md-3">
        <?php print render($page['sidebar_second']) ?>
      </aside>
      <?php endif ?>
    </div>
  </div>
</section>
tonystar commented 9 years ago

Try this:

<section class="main zone">
  <div class="container">
    <div class="row">
      <?php $_content_cols = 12 - 3 * !empty($page['sidebar_first']) - 3 * !empty($page['sidebar_second']) ?>
      <section class="main-col col-md-<?php print $_content_cols  ?>">
        <?php print $messages ?>
        <?php print render($page['help']) ?>
        <?php print render($page['highlighted']) ?>
        <?php print render($page['content']) ?>
      </section>
      <?php if (!empty($page['sidebar_first'])): ?>
      <aside class="main-col col-md-3">
        <?php print render($page['sidebar_first']) ?>
      </aside>
      <?php endif ?>
      <?php if (!empty($page['sidebar_second'])): ?>
      <aside class="main-col col-md-3">
        <?php print render($page['sidebar_second']) ?>
      </aside>
      <?php endif ?>
    </div>
  </div>
</section>
hopfrogsalerno commented 9 years ago

Thanks

Il 05/06/2015 16:32, Anton Staroverov ha scritto:

|

|