Closed (fixed)
Project:
Node Hierarchy
Version:
6.x-1.x-dev
Component:
Drupal/PHP Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2008 at 20:50 UTC
Updated:
13 May 2012 at 03:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
ronan commentedThat should be doable in the theming layer. I'm not as familiar with the d6 theming engine as I am with the d5 one so I can;t give you a good code example, but the theme developer module (part of the devel module) should help point you in the right direction.
Since there's a workaround, and this sort of customization is usually done in the theme in Drupal, I'm going to mark this as will not fix.
Good luck
Ronan
Comment #2
paperfield commentedThanks for the pointer I will probably not install the theme devel module as it has been noted as breaking views. I was able to add to the options_form function in the nodehierarchy.views.inc the extra form I requested plus one extra that are already implemented in views 2. Here are the changes if you are interested.
Added to nodehierarchy.views.inc in the options_form function
$form['label'] = array(
'#type' => 'textfield',
'#title' => t('Label'),
'#default_value' => isset($this->options['label']) ? $this->options['label'] : '',
'#description' => t('The label for this field that will be displayed to end users if the style requires it.'),
);
$form['exclude'] = array(
'#type' => 'checkbox',
'#title' => t('Exclude from display'),
'#default_value' => $this->options['exclude'],
'#description' => t('Check this box to not display this field, but still load it in the view. Use this option to not show a grouping field in each record, or when doing advanced theming.'),
);
I'd like to give credit to the views/includes/field.handlers.inc file that this was snipped from...
Comment #3
ablewave commentedI have tried to implement this as well, but it doesn't seem to be doing the trick for me. My function now looks like (starting at line 149):
I have flushed the views cache, and tried to edit the properties of that field to no avail. What have I missed? I am on version 6.x-1.1.
Comment #4
paperfield commentedThat is the same as my snippet in 6x1.1. I'm not sure where you are getting stopped. Here is what I've done with mine...
In views:
Add Node Hierarchy: Parent Node as a field. You should see the new options.
Set - Display this field as: Node Parent Title and check Exclude from display. You should also be able to change/remove the label.
In basic settings you will want to set the style to Table. Under settings for the style pick Node Hierarchy: Parent Node as the Grouping Field
If you are not seeing the new options at all I'm not sure what that issue is.
Comment #5
ablewave commentedGreatly appreciate you getting back to me. Still don't have the options. Care to post your revised file in its entirety? OR was there something to be done to template.php or some other file?
Thanks again...
Comment #6
jadakren commentedIf anyone is still trying to get this to work then it is posible with version :
File :
modules-folder/nodehierarchy/includes/views/views_handler_field_nodehierarchy_parent.incFind this function :
Change it to this :
Comment #7
ashedryden commentedThanks - this worked perfectly to add the basic views field options.
Comment #8
derjochenmeyer commentedThe keyline in #6 is
Attachted patch restores the default handler options.
Comment #9
jbylsma commentedLabel and exclude were added in #386470: A way to change the title, and display options in views integration