help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

How to get custom field(s) in eventlist plugin in article?

How to get custom field(s) in eventlist plugin in article?

4 years 6 months ago
#27806
I went through the forum, but couldn't find an answer.
On my site I have a list of events (courses) and I want to add a collumn for price. In the event details I have put that info in the custom field 1 and had that renamed through the language overrides.

I tried to edit components/com_jem/common/views/templ/default_events_table.php by copying the city-parts and renaming all city info to custom1. But the collumn isn't added to the view and/or is empty.

You can see the eventlist at www.jasperjwatersport.nl/vaartheorie/klein-vaarbewijs-1 (in dutch).
Can anyone please help me?

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

Re: How to get custom field(s) in eventlist plugin in article?

4 years 6 months ago
#27810
Hi, I don't understand:
I see the custom field "price" what's the problem.

The second thing I don't understand. What do you want?

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

Re: How to get custom field(s) in eventlist plugin in article?

4 years 6 months ago - 4 years 6 months ago
#27811
I guess you tried to get the value by
Code:
$this->escape($row->city)
in Eventlist View on GitHub.

But did you have a look at the model for this?
Eventlist Model on GitHub

I did not yet code anything in JEM nor am I a PHP specialist yet, but as far as I can see, custom1 ... custom10 are not retrieved from the database for rows.
So I guess you must enhance the model, too.

BTW: In this way, updates of JEM might overwrite your changes.
Last edit: 4 years 6 months ago by Wolfgang.

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

Re: How to get custom field(s) in eventlist plugin in article?

4 years 6 months ago - 4 years 6 months ago
#27812
jojo12 wrote: Hi, I don't understand:
I see the custom field "price" what's the problem.
On the eventdetail page you can see the customfield, but not in the eventlist.
The second thing I don't understand. What do you want?
There I want an extra collumn with the price.
Last edit: 4 years 6 months ago by JasperJ.

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

Re: How to get custom field(s) in eventlist plugin in article?

4 years 6 months ago - 4 years 6 months ago
#27813
Wolfgang wrote: I guess you tried to get the value by
Code:
$this->escape($row->city)
in Eventlist View on GitHub.

But did you have a look at the model for this?
Eventlist Model on GitHub
I checked both, but can't get it to work.
I did not yet code anything in JEM nor am I a PHP specialist yet, but as far as I can see, custom1 ... custom10 are not retrieved from the database for rows.
So I guess you must enhance the model, too.
I agree that there lies my challenge. But I'm not really a php specialist as well...
BTW: In this way, updates of JEM might overwrite your changes.
I know, but once I know where and how to fix this, I can change it again after an update.
Last edit: 4 years 6 months ago by JasperJ.

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

Re: How to get custom field(s) in eventlist plugin in article?

4 years 6 months ago
#27823
Nevertheless, if you find a solution, please share it.
Currently we are a little bit short on developers and the main focus should be Joomla! 4.0 and PHP 8.
Therefore special solutions are not in the scope currently.
But I am interested in your findings, even if we cannot apply it to a column like "citiy", we might add additional columns in (far) future. Then we had to enhance the admin part for the settings, too. Additional columns like custom fields from event or venue must come with the option to disable/enable them.
The following user(s) said Thank You: jojo12

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

Time to create page: 0.476 seconds