1. In views selected: Row Style -> Fields (Fullcalendar)
2. Checked "Use a custom event title" option, and chosen a field from those added before.
Fullcalendar continues to show the node title as title.
Even if I use the rewrite output for node title, to include through tokens other fields, only the title is shown.
I'm using Views 6.x-3.0rc2

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

landing’s picture

I have the same issue

tim.plunkett’s picture

Status: Active » Postponed (maintainer needs more info)

Can you export your view and paste it here? http://paste.pocoo.org
Sorry you're having this bug, thanks for helping to resolve it.

landing’s picture

Here's my code http://paste.pocoo.org/show/505512/

I am displaying a calendar for a node that has separate date fields. The dates are displaying correctly in my view, but ideally I would like the title for each view result to be the label for that field. Is this possible?

tim.plunkett’s picture

@landing, that shows you have the title field set to 'counting'. Not sure what that is.

I don't think it currently supports that, and likely not in D6. Let me brainstorm on a way to accomplish that though.

landing’s picture

@tim.plunkett - http://paste.pocoo.org/show/505555/ here's the correct export. I have the title set to a custom text field, yet the export shows "nothing" for the title.

A thought on implementing titles on a per field basis: Can you use the views field label value as the title for a view result/row?

landing’s picture

Updated to dev and it's working as it's supposed to. I would still be interested in have more custom options available for text that is shown in event displays.

tim.plunkett’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Fixed

You can use Views field rewriting to accomplish whatever you need to display in events.

Status: Fixed » Closed (fixed)

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

achrelam’s picture

Hello,

Am sorry, i re-opened this ticket because am having the same problem.

First, i tried to rewrite one of my field, by using pattern replacement, but it won't work, it shows only the real value of the field.

I also tried to create a custom php field, and include the other fields, but this time fullcalendar displayed the node title.

Any idea ?

Thank you so much for this module.

tim.plunkett’s picture

@achrelam You need to edit the fullcalendar field settings and customize the title field to explicitly use the rewritten field.

lupas’s picture

Same issue here. I have tried rewritting the Title field with no success. Tried also rewriting another field and it won't work either.
Neither creating a new custom Markup field.

Changing the "Custom title" option under the row plugin style settings doesn't make any difference.

aspilicious’s picture

I still can't believe that. I would like a bunch of screenshots here

1) the views settings page
2) the calendar
3) an event node that appears in the calendar
4) the fullcalendar settings (be sure the rewriting is on the screenshot)
5) the rewriting settings of the field

And also check if the development version works

lupas’s picture

@aspilicious, please find attached all the screenshots from my settings. And below are the modules versions.

; Information added by drupal.org packaging script on 2011-12-08
version = "6.x-2.x-dev"
core = "6.x"
project = "fullcalendar"
datestamp = "1323303967"

; Information added by drupal.org packaging script on 2011-12-18
version = "6.x-3.x-dev"
core = "6.x"
project = "views"
datestamp = "1324212224"

landing’s picture

It seems like I'm still facing the same problem, except that when I choose the a custom text field as the title field, it resorts back to displaying the node titles for each event on the calendar.

I've got the same set up as lupas.

lupas’s picture

Any progress on this issue?

akaita’s picture

Same thing here.
I have views 6.x-3.0, and I tried both fullcalendar 6.x-2.0-alpha2 and 6.x-2.x-dev (december 31).

I'd like to add that I can change the custom title to the first date field. Not to the second date field, not to any other field; fullcalendar always shows the node's title, except when I choose the first date field.

tim.plunkett’s picture

Category: support » bug
Status: Closed (fixed) » Active

Okay, thanks @akaita, that's some useful information. Reopening.

akaita’s picture

By the way, I tried and the exact same thing (can customize to first date, any other field goes to default) happens if I try to customize the "event redirect URL".

Hope it helps.

pauljb’s picture

+1

pauljb’s picture

Is there any progress on this issue?

Thanks

akaita’s picture

I applied http://drupal.org/node/1076576#comment-5425134 for another problem I was having, and I can select any custom title I want now!

Right now:
FullCalendar 6.x-2.0-alpha2
Views 6.x-3.0
patch: http://drupal.org/node/1076576#comment-5425134

Custom title working ok!

tim.plunkett’s picture

Category: bug » support
Status: Active » Fixed

Marking back, then.

Status: Fixed » Closed (fixed)

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

Azol’s picture

Sorry for opening this again, but the latest code does not work for me,
I am looking at this fragment of theme.inc (comments were added by me to better illustrate my point):

  // Fetch custom title if needed.
  if (!empty($options['fc_title'])) {
    $field_name = str_replace('_value', '', $options['fc_title_field']);
    if (is_array($node->$field_name)) {                                    // if you use custom fields in Views for node title, this would not exist! For example, I want to use the real name of the node author via relationship. Views names this field 'realname'. Guess what... $node->realname does not exist!
      if (isset($node->{$field_name}[0]['value'])) {
        $node->title = $node->{$field_name}[0]['value'];
      }
    }
    elseif (isset($node->$field_name)) {                                   // You will always end up using default value no matter what
      $node->title = $node->$field_name;                                // We use default value...
    }
  }

and honestly I do not understand why it tries to look for actual values in $node object instead of $vars['row'] array which contains actual Views data with all the rewrite rules applied!

andyb85’s picture

Status: Closed (fixed) » Active

Hmm I did the same and doesn't seem to resolve my issue. Maybe my bad luck :(

aspilicious’s picture

Well create a patch so others can test it. :)

rlnorthcutt’s picture

The problem here is that we aren't respecting the display of the field selected. In my case, I am trimming the title to 60 characters, so even if the title is pulled in properly, its not trimmed by the display plugin. I was able to hack it by changing:


  // Fetch custom title if needed.
  if (!empty($options['fc_title'])) {
    $field_name = str_replace('_value', '', $options['fc_title_field']);
    if (is_array($node->$field_name)) {
      if (isset($node->{$field_name}[0]['value'])) {
        $node->title = $node->{$field_name}[0]['value'];
      }
    }
    elseif (isset($node->$field_name)) {
      $node->title = $node->$field_name;
    }
  }

to


  // Fetch custom title if needed.
  if (!empty($options['fc_title'])) {
    $field_name = str_replace('_value', '', $options['fc_title_field']);
    $row_index = $vars['view']->row_index;
    $node->title = $vars['view']->style_plugin->rendered_fields[$row_index][$field_name];
  }

Unless I am missing something, it seems that we should just be using template_preprocess_fullcalendar() to check for the options and then loop through the results to build the output. It just doesn't seem that doing this at the field level is really helping us unless there is an easier way to get the actual rendered display for the selected fields.

fengtan’s picture

#30 works for me, thanks. I rolled the code into a patch for convenience, if anyone is interested.

kevinquillen’s picture

Version: 6.x-2.x-dev » 7.x-2.0

The View preview does not reflect this change or other Custom field changes - but the View on the frontend does. It is very confusing.

bjlewis2’s picture

Issue summary: View changes
FileSize
36.21 KB
23.93 KB
29.32 KB

I'm going to echo @kevinquillen. I was confused because the preview shows no text, but the live calendar displays the placeholders.

Here's my rewrite rule:

Here's the preview:

And here's the live view:

Hope that helps!

(Oh, and this was using:
Core: 7.27
FullCalendar: 7.x-2.0
FullCalendar Library: 1.6.4)

jsheffers’s picture

Does this work for the google calendar as well? I can't seem to get it change at all.