- Posts: 6
- Thank you received: 0
Add Category in Table view
- ronny_vdb
- Topic Author
- Offline
- New Member
-
Less
More
11 years 5 months ago #51126
by ronny_vdb
Add Category in Table view was created by ronny_vdb
Hi,
There are issus when using colors, if you put an event in multiple categories the color is ignored.
I'm looking for a work karound and since my categories are just one word i would like to use the category name as a css style.
In orde to get this working I need to add the category to the Table view.
It seems there are is no way to add this form the configuration.
Could you please inform how one can add the category information in the table view for each event seperately?
There are issus when using colors, if you put an event in multiple categories the color is ignored.
I'm looking for a work karound and since my categories are just one word i would like to use the category name as a css style.
In orde to get this working I need to add the category to the Table view.
It seems there are is no way to add this form the configuration.
Could you please inform how one can add the category information in the table view for each event seperately?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
11 years 5 months ago #51146
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Add Category in Table view
Hi
Could you please send me the link to "Table view" page on your site? In Events Booking, each event can be assigned to different categories, so if you want to display categories in table view, you will have to prepare to customize the code.
I will guide you if needed. But first, I need to have the link to the page so that I can understand exactly what you are trying to do
Tuan
Could you please send me the link to "Table view" page on your site? In Events Booking, each event can be assigned to different categories, so if you want to display categories in table view, you will have to prepare to customize the code.
I will guide you if needed. But first, I need to have the link to the page so that I can understand exactly what you are trying to do
Tuan
The following user(s) said Thank You: ronny_vdb
Please Log in or Create an account to join the conversation.
- ronny_vdb
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
11 years 5 months ago #51154
by ronny_vdb
Replied by ronny_vdb on topic Add Category in Table view
Sure: this is the table-view:
www.powerview.be/dev/agenda
As you can see on that page I also use the categories module, there i have made some css styles with the same name as the category title. We only need to use 2 colors. If I could add the same category-name to an event my problem would be solved.
But I must say that it is a shame that you can only use the colors-field that is available in the category-settings in de calendar-view. For me the ability to use colors was the USP to buy this component.
As you can see on that page I also use the categories module, there i have made some css styles with the same name as the category title. We only need to use 2 colors. If I could add the same category-name to an event my problem would be solved.
But I must say that it is a shame that you can only use the colors-field that is available in the category-settings in de calendar-view. For me the ability to use colors was the USP to buy this component.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
11 years 5 months ago #51199
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Add Category in Table view
Hi Ronny
Sorry but I still don't understand what you are trying to do :
1. You want to add category of event (as a new column in the table)
2. Or you want to have some way to color the row which display in the table ?
BTW, I don't think use color in Category view won't be the USP to buy this component. To be honest, this is the first time I receive the request for this feature
Tuan
Sorry but I still don't understand what you are trying to do :
1. You want to add category of event (as a new column in the table)
2. Or you want to have some way to color the row which display in the table ?
BTW, I don't think use color in Category view won't be the USP to buy this component. To be honest, this is the first time I receive the request for this feature
Tuan
Please Log in or Create an account to join the conversation.
- ronny_vdb
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
11 years 5 months ago #51220
by ronny_vdb
Replied by ronny_vdb on topic Add Category in Table view
Answer 2. Every event from the same category should have te same background color (like in the calendar view).
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
11 years 5 months ago #51240
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Add Category in Table view
Final question before I can help you edit the code to make it possible: In your case, each event will only belong to a category, correct ?
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- ronny_vdb
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
11 years 5 months ago #51242
by ronny_vdb
Replied by ronny_vdb on topic Add Category in Table view
I'm afraid not. It wil belong to one category and multiple additional categories.
Isn't is possible to use only the main_category to assign the color ?
I only need 2 color, so we could do 2 main categories and all the rest would be children. But then de children would have multiple additional categories...
Isn't is possible to use only the main_category to assign the color ?
I only need 2 color, so we could do 2 main categories and all the rest would be children. But then de children would have multiple additional categories...
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
11 years 5 months ago #51265
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Add Category in Table view
Hi
I understand it now. And Yes, we can use main category (I forgot I added that main category selection).
OK. So I made some change to the code to make it easier for you to style each row. So please :
1. Get this file, unzip if and upload it to components/com_eventbooking/views/common folder
2. If you look at the file components/com_eventbooking/views/common/events_table.php now, you will see that I added the code to get category name and category id of the main category of each event and store them in $categoryName and $categoryId variable. Hope your remaining job is easy now. For example:
If you want to add the css class for tr tag, you can try
<tr class="<?php echo $categoryName; ?>">
I think you know code, correct ? So that above guide should be enough for you to make the customization
Tuan
I understand it now. And Yes, we can use main category (I forgot I added that main category selection).
OK. So I made some change to the code to make it easier for you to style each row. So please :
1. Get this file, unzip if and upload it to components/com_eventbooking/views/common folder
2. If you look at the file components/com_eventbooking/views/common/events_table.php now, you will see that I added the code to get category name and category id of the main category of each event and store them in $categoryName and $categoryId variable. Hope your remaining job is easy now. For example:
If you want to add the css class for tr tag, you can try
<tr class="<?php echo $categoryName; ?>">
I think you know code, correct ? So that above guide should be enough for you to make the customization
Tuan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
11 years 5 months ago #51266
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Add Category in Table view
Sorry. Forgot to upload the modified file
Tuan
Tuan
The following user(s) said Thank You: ronny_vdb
Please Log in or Create an account to join the conversation.
- ronny_vdb
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
11 years 5 months ago #51277
by ronny_vdb
Replied by ronny_vdb on topic Add Category in Table view
That does the trick !
Thanks !
Thanks !
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2026 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
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.
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.