- Posts: 17
- Thank you received: 0
How to change table layout?
- Reto Rappa
- Topic Author
- Offline
- New Member
-
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
It is possible but you will need to modify code. However, I am not sure you should modify it because the table layout don't have enough space to show the description of the document. Maybe you can try to edit the code in the file components/com_edocman/views/common/documents_table.php to add the description to table ?
Give it a try to see how it goes.
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Reto Rappa
- Topic Author
- Offline
- New Member
-
- Posts: 17
- Thank you received: 0

I use the description field for displaying a part number. Another question - is it possible to sort the table for the description field? If yes, where to add/change the code?
And I want to sort the table not with the standard sort button, but with two buttons (arrow up/down) next to each table headline. For example: Title (sort arrow up/down) / Description (sort arrow up/down) / etc. How to enable this?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
Unfortunately, it is not possible to do that. If you change the ordering in one way, the other user change it in different way, how will the system display these records ?
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Reto Rappa
- Topic Author
- Offline
- New Member
-
- Posts: 17
- Thank you received: 0
So once more: As the site-visitor (frontend) can change sorting by title and date, is it possible to sort by description and where to change this (not tbl.title or tbl.created_time, but tbl.description or similiar)? Thank you.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
And I want to sort the table not with the standard sort button, but with two buttons (arrow up/down) next to each table headline. For example: Title (sort arrow up/down) / Description (sort arrow up/down) / etc. How to enable this?
So if you want to sort the documents based on the description , not by date or ordering or title, then you will need to customize code:
1. Open the file components/com_edocman/models/category.php
2. Find the code below:
3. Add the lines of code below after that line:
$this->state->filter_order = 'tbl.description';
$this->state->filter_order_Dir = '';
After that, check it again and it should work as expected. Please note that this will be the ordering used for all users, each user cannot choose the ordering he wants (For example, A want to order by title, B want to order by date...).
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Reto Rappa
- Topic Author
- Offline
- New Member
-
- Posts: 17
- Thank you received: 0

Please forget what I wrote above, one step after the other. If I activate the table layout for the document listing and also activate the "show sort options", is there a way to add another sort option? Actual the user in the frontend can sort the document listing for title, date and sorting, ascending and descending. Can I add an option that the user can also sort for description?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
Maybe it doesn't change because you are entering the description into short description field of documents instead of entering into description field ?
For your last questions, yes, you can. Follow the instructions below :
1. Open the file components/com_edocman/views/category/view.html.php
2. Find the code below:
3. Add this line of code below after the above lines:
After that, please try again to see how it goes.
Tuan
Please Log in or Create an account to join the conversation.
- Reto Rappa
- Topic Author
- Offline
- New Member
-
- Posts: 17
- Thank you received: 0
As written above, I want to include some arrow-images near the table-headings to make a direct sorting easier for the user. For example: Title (sort arrow up / sort arrow down)
What code do I have to include for the href-tag (I suppose) of the arrow-image, if I want to klick on the sort-up-arrow-image to let the table be sorted by "Title ascending"?
Please Log in or Create an account to join the conversation.
- Jolo
- Offline
- New Member
-
- Posts: 15
- Thank you received: 0
Please help,
Jolo Cruz
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
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.