custom field in Upcomming events - Timeline layout
- Tuan Pham Ngoc
- Offline
- Administrator
Less
More
5 years 10 months ago #122190
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic custom field in Upcomming events - Timeline layout
Hello
You will need to customize code of the layout and add display the value in the position you want. The file you need to customize is:
components/com_eventbooking/themes/default/common/events_timeline.php
Use the code below to display value of the field:
$params = new JRegistry();
$params->loadString($event->custom_fields, 'JSON');
echo $params->get('veranstalter'); // veranstalter is name of the field
Tuan
You will need to customize code of the layout and add display the value in the position you want. The file you need to customize is:
components/com_eventbooking/themes/default/common/events_timeline.php
Use the code below to display value of the field:
$params = new JRegistry();
$params->loadString($event->custom_fields, 'JSON');
echo $params->get('veranstalter'); // veranstalter is name of the field
Tuan
Please Log in or Create an account to join the conversation.
- ozwest
- Offline
- Premium Member
Less
More
- Posts: 121
- Thank you received: 1
5 years 8 months ago #123808
by ozwest
Replied by ozwest on topic custom field in Upcomming events - Timeline layout
I am customising the up-coing events module and I have difficulties displaying custom fields. Here is my code:
<?php
$params = new JRegistry();
$params->loadString($event->custom_fields, 'JSON');
echo $params->get('presenter'); // presenter is name of the field
echo $presenter;
?>
I don't get any value even though there is a value in that field.
Can you advise please? Thank you
<?php
$params = new JRegistry();
$params->loadString($event->custom_fields, 'JSON');
echo $params->get('presenter'); // presenter is name of the field
echo $presenter;
?>
I don't get any value even though there is a value in that field.
Can you advise please? Thank you
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
5 years 8 months ago #123812
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic custom field in Upcomming events - Timeline layout
The code looks correct to me. What version of the extension you are using?Are you using latest version?
Maybe you should echo $event->custom_fields to see whether it contains any value. Base on that, you can check it further
Tuan
Maybe you should echo $event->custom_fields to see whether it contains any value. Base on that, you can check it further
Tuan
Please Log in or Create an account to join the conversation.
- ozwest
- Offline
- Premium Member
Less
More
- Posts: 121
- Thank you received: 1
5 years 8 months ago #123816
by ozwest
Replied by ozwest on topic custom field in Upcomming events - Timeline layout
Hello Tuan
I am using the latest version 3.9.
I have echoed the $event->custom_fields and there is not value coming back.
However if I look at the events full listing, all the values from the custom fields are there.
Strange indeed.
I am using the latest version 3.9.
I have echoed the $event->custom_fields and there is not value coming back.
However if I look at the events full listing, all the values from the custom fields are there.
Strange indeed.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
5 years 8 months ago #123820
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic custom field in Upcomming events - Timeline layout
In this case, better submit a support ticket sending us:
- Super admin account of your site
- Link to the page which the module is being displayed
We will check to see why that data is not available and guide you to correct it
Tuan
- Super admin account of your site
- Link to the page which the module is being displayed
We will check to see why that data is not available and guide you to correct it
Tuan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
5 years 8 months ago #123841
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic custom field in Upcomming events - Timeline layout
The only thing which is wrong is you need to use $row->custom_fields instead of $event->custom_fields in the module layout
I corrected it on your site and it works good now
Tuan
I corrected it on your site and it works good now
Tuan
The following user(s) said Thank You: ozwest
Please Log in or Create an account to join the conversation.
- ozwest
- Offline
- Premium Member
Less
More
- Posts: 121
- Thank you received: 1
5 years 8 months ago #123843
by ozwest
Replied by ozwest on topic custom field in Upcomming events - Timeline layout
Thanks Tuan, this is awesome.
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.