DrupalBin
Submit Code
About
Recent Posts
Views 2 get all field names
38 min 26 sec
ago
Code
1 hour 16 min
ago
How do i make this work in D6 (I have to clear the cache everytime to see the tabs)
4 hours 7 min
ago
Code
5 hours 2 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for Inserting a nodereference field into a view.
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
// Add the nodereference field if it's not present. $nodereference_table = content_views_tablename($nodereference_field); $nodereference_db_info = content_database_info($nodereference_field); $nodereference_column = $nodereference_db_info['columns']['nid']['column']; if (!array_key_exists($nodereference_column, $view->display[$display_id]->display_options['fields'])) { $view->add_item($display_id, 'field', $nodereference_table, $nodereference_column); }
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.