Making one view look like another one

×

Error message

  • Warning: count(): Parameter must be an array or an object that implements Countable in bootstrap_table() (line 114 of /home/omahane/coder-notes.com/sites/all/themes/bootstrap/templates/system/table.func.php).
  • Warning: count(): Parameter must be an array or an object that implements Countable in bootstrap_table() (line 189 of /home/omahane/coder-notes.com/sites/all/themes/bootstrap/templates/system/table.func.php).
  • Warning: count(): Parameter must be an array or an object that implements Countable in bootstrap_table() (line 238 of /home/omahane/coder-notes.com/sites/all/themes/bootstrap/templates/system/table.func.php).
  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2405 of /home/omahane/coder-notes.com/includes/menu.inc).

To take one view and make it look like another can be pretty trivial. 

Let's call them "old style view" and "new style view". 

In my case, most of the presentational work of both views was being done with custom text, which means that I was bringing the fields in earlier in the view, but excluding them from displaying. Then, I used the tokens created by the view of those excluded fields in a custom text field, wrapping them in tags and classes that made sense. 

<!-- vertical -->
<div class="event-item">
<div class="event-calendar-left">    
    <div class="event-calendar-box">
        <div class="box-top-month">
            [field_imported_cal_event_date_2]
        </div>
        <div class="box-bottom-day">
            [field_imported_cal_event_date_3]
        </div>
    </div><!-- END of .event-calendar-box -->
</div><!-- END of .event-calendar-left -->
    <div class="event-calendar-right">
        <div class="event-brief-desc">
        <div class="event-desc-top">
            <div class="event-name">
            [title]<br>
        </div>
        <div class="event-date">
            [field_imported_cal_event_date_1]
        </div>
        <div class="event-time">
            [field_imported_cal_event_date_4]
        </div>

        </div><!-- .event-desc-top -->
        <div class="event-desc-bottom">
            <div class="event-summary">[body]</div>
            <div class="event-more-info"><a href="[field_imported_cal_link]">More Information</a>
            </div>
        </div><!-- .event-desc-bottom -->
    </div><!-- .event-brief-desc -->
    </div><!-- .event-calendar-right -->
</div><!-- .event-item -->