Custom fields in Timeline layout and Upcoming events module

  • Davide
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 1 month ago #133029 by Davide
Hi Tuan I would like to dislpay in the module "Upcoming Events" and "Timeline" layout custom fileds I have created. I know that I should override the files, but can you help me with the code? is it possible?
I think It's easy but I don't have php code experience.
Thank you very much

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #133039 by Tuan Pham Ngoc
Hi Davide

You will have to write the code yourself. I can only give you instructions, where and how you want to display the fields, you will have to implement it yourself. Let's work with upcoming events timeline layout first

1. Open the file components/com_eventbooking/themes/default/common/events_timeline.php

2. You can use this code to display the custom fields you want
Code:
<?php echo $event->field_speaker; ?>

Please replace field_speaker with name of the custom field you want to display custom field value. You can do the same for any other custom fields which you created

Tuan

Please Log in or Create an account to join the conversation.

  • Davide
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 1 month ago #133040 by Davide
Thank you Tuan concerning the events_timeline I was able to modify the code successfully

I'm not able to modify the Horizontal layout concerning the upcoming events module.
Maybe there is something wrong were I place the following code:
Code:
<div> <strong><i class="uk-icon-small uk-icon-heartbeat"></i>&nbsp;DIFFICOLTA': </STRONG><?php echo $event->field_difficolta; ?><br /> <strong><i class="uk-icon-small uk-icon-area-chart"></i>&nbsp;DISLIVELLO: </STRONG><?php echo $event->field_dislivello; ?> </div>

Thank for your support

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #133052 by Tuan Pham Ngoc
Hello

It's because the module does not include event custom fields in the output yet. I modified some code to support that

Please update your site to this updated package of the module, then try again. It should work well

Regards,

Tuan
Attachments:

Please Log in or Create an account to join the conversation.

  • Davide
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 1 month ago #133056 by Davide
Thank you very much Tuan very helpful
This will be also in the next package update?
thank you again for your precious support
have a nice day

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #133057 by Tuan Pham Ngoc
Yes Davide. It was added to update package on server already (together with other code cleanup/improvements). No new version releases for these small changes yet, of course

Tuan

Please Log in or Create an account to join the conversation.