Event Custom Fields shown in frontpage modules (default and improved)

  • Markus Schwendtner
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 months 3 weeks ago #164250 by Markus Schwendtner
Hi, 

I have successfully added event custom fields in the component views (and added them to my template/html/com_eventbooking/common folder).

The syntax that I used to include event custom fields in the timeline is for example
                                <?php echo $event->field_EventStatus; ?>

Now I am trying to adjust the layout and add some event custom fields also to the modules that show upcoming (and past) events. I am using the improved view for upcoming events, and the default view for past events.

Can someone hint me in the right direction which files I need to edit, how to address the custom field, and where to put them in my template folder so that they dont get overwritten with the next update ?

Thanks a lot !

Cheers,
Markus

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
2 months 3 weeks ago #164275 by Tuan Pham Ngoc
Hi Markus

The file you need to modify is modules/mod_eb_events/tmpl/default.php and modules/mod_eb_events/tmpl/improved.php

Once the modification is done, please move the modified file to templates/template_name/html/mod_eb_events folder so that the change won't be lost when you update to future releases of the extension. template_name is name of the template which you are using on your site

Tuan

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

  • Markus Schwendtner
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 months 3 weeks ago #164287 by Markus Schwendtner
Hi Tuan,

many thanks. Is the folder in my templates just /mod_eb_events, or is it /mod_eb_events/common (like for the component files) ?

also, any advise on how to address the event custom fields ? I guess it is different to <?php echo $event->field_EventStatus; ?> which I am using in the component ?

Thanks a lot for your help!

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
2 months 3 weeks ago #164304 by Tuan Pham Ngoc
Hello

It is just mod_eb_events. I wrote it in my answer, no common folder here for the module layout override

And Yes, the code you wrote for displaying custom fields should work

Regards,

Tuan

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

Moderators: Tuan Pham Ngoc