I've spent almost two days on this and have no idea why it's not working. I thought at first I was modifying the wrong template or placing them in the wrong place, but after modifying the base template with no luck I am lost.

I am trying to apply a class to the title H3 so it will use an image for a upcoming events calendar view. I copied views-view-list.tpl.php and changed the name to views-view-list--calendar--upcoming.tpl.php and saved it in the profiles/openpublic/themes/openpublic_theme/views

After a rescan of the template files it shows up in bold, so far so good.

I then modified the template to:

<?php
// $Id: views-view-list.tpl.php,v 1.3.6.3 2010/12/07 17:19:09 dereine Exp $
/**
 * @file views-view-list.tpl.php
 * Default simple view template to display a list of rows.
 *
 * - $title : The title of this group of rows.  May be empty.
 * - $options['type'] will either be ul or ol.
 * @ingroup views_templates
 */
?>
<?php print $wrapper_prefix; ?>
  <?php if (!empty($title)) : ?>
    <h3 class="calendar"><?php print $title; ?></h3>
  <?php endif; ?>
  <?php print $list_type_prefix; ?>
    <?php foreach ($rows as $id => $row): ?>
      <li class="<?php print $classes_array[$id]; ?>"><?php print $row; ?></li>
    <?php endforeach; ?>
  <?php print $list_type_suffix; ?>
<?php print $wrapper_suffix; ?>

I updated my CSS and got no result. After some back and forth I removed the entire title line so my template file looked like this:

<?php
// $Id: views-view-list.tpl.php,v 1.3.6.3 2010/12/07 17:19:09 dereine Exp $
/**
 * @file views-view-list.tpl.php
 * Default simple view template to display a list of rows.
 *
 * - $title : The title of this group of rows.  May be empty.
 * - $options['type'] will either be ul or ol.
 * @ingroup views_templates
 */
?>
<?php print $wrapper_prefix; ?>
  <?php if (!empty($title)) : ?>

  <?php endif; ?>
  <?php print $list_type_prefix; ?>
    <?php foreach ($rows as $id => $row): ?>
      <li class="<?php print $classes_array[$id]; ?>"><?php print $row; ?></li>
    <?php endforeach; ?>
  <?php print $list_type_suffix; ?>
<?php print $wrapper_suffix; ?>

The title was still there. I went in and clicked on the "Style output" link in the view only to see that my changes were not showing up.

After some more hair pulling I decided to modify views-view-list.tpl.php directly. I deleted my template, rescanned template files (which switched back to views-view-list.tpl.php). Clicked the "Style output" which DID reflect my change. After saving I went back to the home page only to find the title firmly in place.

???

Comments

WebmasterDrake’s picture

Side note: I thought this may have been due to the addition of the calendar module. However, I have the same problem trying to modify the Home Page Block view for press releases.

bfroehle’s picture

This sounds like a cache issue.

WebmasterDrake’s picture

That's what everyone has said however I've cleared the cache multiple times to no avail. I even spoke with the PM for OpenPublic and they had no fix.

bfroehle’s picture

Maybe ask for support in the Views queue?

bfroehle’s picture

Another thought -- the content on the front page is probably a BLOCK, where the title is provided by the block settings and additional classes can be configured in the block ui (possibly after you install a module like 'block class').

hefox’s picture

Version: » 7.x-1.x-dev
Status: Active » Closed (won't fix)

been too long, probably been resolved