first_node is TRUE by default and no way to change it

joachim - December 5, 2008 - 14:59
Project:Views carousel
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:reviewed & tested by the community
Description

viewscarousel_get_settings() sets the default of first_node to true, yet there is no way in the interface to set this value.
So you get a weird node stuck in the view for no apparent reason.

#1

mogtofu - April 16, 2009 - 10:52
Status:active» patch (to be ported)

Got the same issue.

Problem come form lack of option in the module, juste add this on the function viewscarousel_setup_form :
- line 11 - insert -

<?php
  $form
['carousel_settings']['first_node'] = array(
   
'#title' => t('Show first node'),
   
'#default_value' => $settings['first_node'],
   
'#type' => 'select',
   
'#options' => array(true => t('Yes'), false => t('No')),
   
'#description' => t('Show the content of the first node above the carousel.'),
  );
?>

regards.

#2

neclimdul - June 2, 2009 - 20:48
Status:patch (to be ported)» reviewed & tested by the community

patch. I chose to go with a checkbox though since it was consistent with the other options.

AttachmentSize
jcarousel_first_node_setting.patch 1.02 KB
 
 

Drupal is a registered trademark of Dries Buytaert.