M
M
montpellier2021-12-20 19:07:09
Joomla
montpellier, 2021-12-20 19:07:09

How to make a dynamic table in joomla using fields?

In general, there is a category, it has materials, each material naturally has its own information. Each material has its own table with data (for example: 3 columns Name, prices, weight). I have the content module in one place, and the table should be in a different section altogether. I did through the positions of the modules. How can I make a dynamic table so that the data is loaded for each material. Tried via add. material fields. But I don't understand how to do it right. Maybe there are some better options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Gruznykh, 2021-12-21
@montpellier

In Joomla, the condition for whether a module is shown on a given page or not is the binding of this module to a particular menu item.
If there are not very many materials, you can create a separate "system", hidden menu and for each material a separate item in this menu and attach a module to each item that displays its own table for this material.
Another way is to use the MetaMod module, which greatly expands the number of conditions for displaying a particular module and eliminates the need to create all these menu items. Modules, however, will have to be created. In MetaMod, we use something like this custom code in the PHP field:

if (( $view == 'article' ) and ( $id == '123' )) return 12; // 123 - ID материала, 12 - ID модуля
if (( $view == 'article' ) and ( $id == '124' )) return 13;
if (( $view == 'article' ) and ( $id == '125' )) return 14;

etc.
The MetaMod module should be placed in the position where dynamic tables should be displayed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question