0

I have an events page on my (D7) site, and the admin can set up recurring events.

When creating a list of the events, I see the recurring events come through in the right place intermingled with the non-recurring events. However, their dates don't show up right:

My "normal" date fields only ever show the date of the first event. There's an answer to this issue here, but that requires table layout. I'd prefer not to have to use table layout. Any idea how I could do this without it?

Secondly, I'm using a pre-process field (called big_date) to create a second date field but with a different display to the first, so I can display the same date in different formats simultaneously. How could my code here know which of the many dates in $vars['node']->field_date_and_time[LANGUAGE_NONE] is the one relating to the "current" instance of the event?

1

I spoke briefly about this to a Drupal expert I know, and he suggested moving to using Views and the Fields view type as apparently the integration between the Date module and Views is very good.

At present, I'm using a View but also using Viewmodes and the preprocess field. His point was that all of this could instead be accomplished by just using my existing content type, not using a custom viewmode but using the Fields view type. And that this should be less buggy.

  • I'm not going to mark my own answer as "The Answer" just yet, in case someone else comes up with a more useful one! But I might in future. – Sam May 24 '13 at 15:30
  • In the end we went with the Panel fields View type as this provides both good field functionality and good layout functionality, both of which we need. – Sam Jun 5 '13 at 14:01

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.