There may be an obvious answer to this that I'm overlooking. Is there a NineSixty framework way to have two regions adjacent to one another say header1 and header2 with content in header2 and not have header1 collapse if its empty?

Note: I've achieved it with the following:

<div id="header2" class="<?php if (empty($page['header1'])) { print 'prefix-5 grid-3'; } else { print 'grid-3';} ?>">

Is there a simpler way, similar to the context-aware ns() function?

Comments

spgd01’s picture

Read me states the following. I have no Idea if it will work or not:

If needed, subtraction can take place when the variable *is empty* by using
an exclamation mark before it. This is useful for pull/push and prefix/suffix
classes in some contexts.


<div class="container-16">
  <div id="main" class="grid-10 <?php print ns('suffix-6', !$neighbor_c, 6); ?>">
    ...                                        [default]        |        |
  </div>                                                        |- pair -|
                                                                |        |
  <?php if ($neighbor_c): ?> <!---------------------------------/        |
  <div id="neighbor-c" class="grid-6"> <!--------------------------------/
    <?php print $neighbor_c; ?>
  </div>
  <?php endif; ?>
</div>

  |--------------- .container-16 --------------------|
  |------------------------------|-------------------|
  |                              |                   |
  |                #main.grid-10 >.suffix-6          |
  |                              |[padding fill]     |
  |------------------------------|-------------------|
spgd01’s picture

Issue summary: View changes

adding code tags