I have a table with 14 columns with column ZBNr as primary key.
The table displays nicely in the ARI Data Tables module in an article.
Because the table is too wide to fit on a page, I make the ZBNr field into a link. When clicked the one record should be displayed in a format where the database columns are displayed as rows in the ARI table. Since the whole page is available for this one record, the user has a better overview.
I based myself on an earlier post in the forum where Link to another ARI Table is explained (
www.ari-soft.com/ARI-Data-Tables/29303-Link-to-another-ari-data-table.html#29344).
The only difference is that the primary and secondary table are the same.
So, I did the following:
1. Duplicate the module.
2. Create a new article with the second module instance.
3. Set the parameter Fixed ID to No for both module instances.
Is this good or bad????
4. In Column settings for the primary table, I have a column with ID = ZBNr and Format = <a href="index.php?option=com_content&view=article&id=68&ZBNr={$value}">{$value}</a>
(Note: I first followed your instructions to put only the index.php?option...={value} part in the Format field and set Recognize links to Yes, but that simply displayed the text "index.php?option..." in the table for column ZBNr. So I put the full link syntax in the Format field).
5. In the parameter settings for the secondary module, I set the SQL query to: SELECT * From #__archiefindex WHERE ZBNr={$REQUEST:ZBNr}
The website now shows the primary table nicely with each ZBNr as a link. Clicking any such link displays the secondary article, but shows the following error message:
DataTables warning (table id = 'at_51ece9d8d2604'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.
The secondary module is stuck on displaying "Processing ..."
I suppose it must have something to do with the WHERE ZBNr={$REQUEST:ZBNr} syntax in the second module, since when I change it to WHERE ZBNr=10001, it does what is then expected.
Here is where I need your help since I am not a programming expert.
I also have the following questions:
1. I want the secondary table to display the database columns as rows in the ARI table. I thought the parameter "Revert data" was doing exactly that. However when I set it, the query does not find any results (with the test query WHERE ZBNr=10001).
2. Can I avoid the second database access? I address the same table twice and the content of all the records (including the selected one) is still available in a variable.
3. My final solution would be to display the secondary table preferably in a tooltip or else in an ARI shadowbox instead of a seperate article. But I first must clear the error case.
My overall impression on this module is very good and I do appreciate your prompt response to customer's questions!
Chris