6.x-2.x-dev release (2011-Apr-19)
select different fields (title & url) doesn't change result.
I replaced in theme/theme.inc
// Fetch custom URL if needed.
if (!empty($vars['options']['custom']['fc_url'])) {
if ($url_field = $vars['options']['custom']['fc_url_field']) {
if (isset($node->{$url_field})) {
$node->url = $node->{$url_field};
}
}
}
// Fetch custom title if needed.
if (!empty($vars['options']['custom']['fctitle'])) {
$title_field = $vars['options']['custom']['fc_title_field'];
if (!empty($title_field) && !empty($node->{$title_field})) {
$node->title = $node->{$title_field};
}
}
By
// Fetch custom URL if needed.
if (!empty($vars['options']['custom']['fc_url'])) {
if ($url_field = $vars['options']['custom']['fc_url_field']) {
$new_url = $vars['view']->render_field($url_field, $vars['view']->row_index);
if (isset($new_url)) {
$node->url = $new_url;
}
}
}
// Fetch custom title if needed.
if (!empty($vars['options']['custom']['fc_title'])) {
$title_field = $vars['options']['custom']['fc_title_field'];
$new_title = $vars['view']->render_field($title_field, $vars['view']->row_index);
if (!empty($title_field) && !empty($new_title)) {
$node->title = $new_title;
}
}
Be carrefull : select plain text for link value.
I didn't test for date.
Anyway, there's a typo fault : fctitle
Comments
Comment #1
aspilicious commentedI debugged because I didn't understand what was going wrong but now I know!
If you put a cck field date as title $title_field will have a value of 'field_date_value'. And in $node you only can find the element 'field_date'. I don't know a lot about views internal rendering, so Tim has to look at your solution.
Comment #2
tim.plunkettComment #3
aspilicious commentedComment #4
tim.plunkettStupid _value and arrays.
Comment #5
aspilicious commentedWorks :)
Comment #6
aspilicious commentedrtbc...
Comment #7
tim.plunketthttp://drupalcode.org/project/fullcalendar.git/commit/5f95e6f
Comment #8
tim.plunkettComment #9
aspilicious commentedNo more beta blocking