Hi,

as always, love your work. However, I have a little problem.

I upgraded from an early version of the Views Bonus Pack (one that didn't have a version number) where I had been using the Panels Teaser view, with 1 Teaser on top and 2 columns of teasers below. After upgrading to both the current 1.1 development version or the alpha version of 1.2 the same view switched to being 1 Full node on top, 2 columns of teasers below.

Was this an intentional change or a bug? I prefer having a list of only teasers, the full node is much too, full, for my uses in a view. I'm not sure if this could be something on my end, but essentially for the top node $teaser is not being set.

thanks,
Patrick

Comments

pcdonohue’s picture

Category: bug » support
Status: Active » Fixed

Ah I see,

I dug into the module code a bit and saw that you have it configurable through the theme.

/**
 * Configuration for the Three column stacked view
 */
function theme_views_bonus_panels_twocol_stacked_config($name) {
  return array(
    'top_teaser' => false, // Should the top node be a teaser?
    'top_links'  => true, // Should the top node have links (like "read more" and "add new comment")?
    'teasers'    => true, // Should other nodes be shown in teaser form?
    'links'      => true, // Should the other nodes have links?
    'inverted'   => false, 
  );
}

So I placed that into my template.php (renamed it for my theme) and voila, the original functionality is back!

That comment should probably read "Configuration for the Two column stacked view" though in the module... and I'd personally set the teaser default to true, just because the old functionality was that way and it avoids people like me who upgraded and then are scrambling to see what changed.

cheers,
Patrick

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

jchampag’s picture

I am new to Drupal and I am having the same problem

Could someone give me simpler instructions about this fix?

Thanks,
John

pcdonohue’s picture

You'll need to modify the template.php file in your theme. If one doesn't exist then you'll have to create one in the directory for your theme.

Add the following function

/**
* Configuration for the Three column stacked view
*/
function yourtheme_views_bonus_panels_twocol_stacked_config($name) {
  return array(
    'top_teaser' => true, // Should the top node be a teaser?
    'top_links'  => true, // Should the top node have links (like "read more" and "add new comment")?
    'teasers'    => true, // Should other nodes be shown in teaser form?
    'links'      => true, // Should the other nodes have links?
    'inverted'   => false,
  );
}

Replace 'yourtheme' with your theme name, so if you're using the zen theme the function name is 'zen_views_bonus_panels_twocol_stacked_config', garland would be 'garland_views_bonus_panels_twocol_stacked_config', etc.

That overrides the modules default theming with the one you provided. We changed top_teaser to be true, the default is false.

You can also see http://www2.drupal.org/node/55126 for a bit more information about overriding theme functions.

hedac’s picture

Status: Closed (fixed) » Fixed

there is another bug......
in line 173....

$config = theme('views_bonus_panels_threecol_config', $view);

replace by

$config = theme('views_bonus_panels_twocol_stacked_config', $view);

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

aerosoul1’s picture

I cant get it to work :(
i´ve added the function to my template.php and renamed it but the view wont change.
any ideas?