0

I am trying to override the path of events created by the fullcalendar module. I am having some issues, and came up with a very general Drupal question:

In a preprocess function, I can modify the $variables array as needed. However, this doesn't necessarily effect the rendered output. Besides for creating a template override (which I don't think I can do in this situation, as fullcalendar does not define a tpl file), can it be modified in a preprocess function?

Here is the code I am trying to use:

function tma_corp_preprocess_fullcalendar(&$variables) {
  foreach($variables['element']['content']['events'] as $event) {

    $event['#event'][0]['#path'] = 'hello2';
    dpm($event);
  }
  dpm($variables);
  //when I look at variables, it has set the path to 'hello2', but the link for each event remains as it was before this change
}
  • I think your module has high weight. You can change the weight of Full calender module in system table – Shabir A. Nov 10 '14 at 17:11
  • when I look at the output of module_list(), I see my module listed last (which makes sense, because when weight of both is 0, the alphabetical order is chose, and my module starts with a 't'). This should mean my module overrides the Full Calendar one, right? Why shouldn't my code work? – user1015214 Nov 10 '14 at 18:27
  • And I also just changed the weight, but it didn't fix anything. – user1015214 Nov 10 '14 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.