Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

How to get custom field(s) in eventlist plugin in article? 2 months 2 weeks ago #27806

  • JasperJ
  • JasperJ's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
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.

How to get custom field(s) in eventlist plugin in article? 2 months 2 weeks ago #27810

  • jojo12
  • jojo12's Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 3334
  • Karma: 45
  • Thank you received: 363
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?
on JEM 2.3.0 stable in latest Joomla (3.9.22) Protostar php7.4.5

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

How to get custom field(s) in eventlist plugin in article? 2 months 2 weeks ago #27811

  • Wolfgang
  • Wolfgang's Avatar
  • Offline
  • Moderator
  • Moderator
  • voluntary webmaster since 1996
  • Posts: 71
  • Thank you received: 36
I guess you tried to get the value by
$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.

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

Last edit: by Wolfgang.

How to get custom field(s) in eventlist plugin in article? 2 months 2 weeks ago #27812

  • JasperJ
  • JasperJ's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0

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.

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

Last edit: by JasperJ.

How to get custom field(s) in eventlist plugin in article? 2 months 2 weeks ago #27813

  • JasperJ
  • JasperJ's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0

Wolfgang wrote: I guess you tried to get the value by

$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.

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

Last edit: by JasperJ.

How to get custom field(s) in eventlist plugin in article? 2 months 2 weeks ago #27823

  • Wolfgang
  • Wolfgang's Avatar
  • Offline
  • Moderator
  • Moderator
  • voluntary webmaster since 1996
  • Posts: 71
  • Thank you received: 36
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.

  • Page:
  • 1
Time to create page: 0.398 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......