- Posts: 5
- Thank you received: 0
A way to display the category name on the Event detail page?
- Eli Pritykin
- Topic Author
- Offline
- New Member
Less
More
5 years 10 months ago #114681
by Eli Pritykin
A way to display the category name on the Event detail page? was created by Eli Pritykin
Looking for a way to display the category name on the event details page.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
5 years 10 months ago #114683
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic A way to display the category name on the Event detail page?
Hi
You can go to Events Booking -> Configuration, look at Themes tab, set Show event's categories config option to Yes and it will be shown
Tuan
You can go to Events Booking -> Configuration, look at Themes tab, set Show event's categories config option to Yes and it will be shown
Tuan
Please Log in or Create an account to join the conversation.
- Eli Pritykin
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
5 years 10 months ago #114685
by Eli Pritykin
Replied by Eli Pritykin on topic A way to display the category name on the Event detail page?
Yes! Don't know how I missed that, thank you!
Taking it a bit further, I'd like to display the category directly under the title. I am looking in the components/com_eventbooking/view/event/tmpl/default.php and trying to figure out how to get the category to show just below the title, but I'm not finding the code responsible for displaying the category name... How can I get that working?
Thanks again
Taking it a bit further, I'd like to display the category directly under the title. I am looking in the components/com_eventbooking/view/event/tmpl/default.php and trying to figure out how to get the category to show just below the title, but I'm not finding the code responsible for displaying the category name... How can I get that working?
Thanks again
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
5 years 10 months ago #114699
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic A way to display the category name on the Event detail page?
Hi Eli
If so, you will have to write the code yourself. Below is the code which can be used to display categories, you can use it on the position you want
If so, you will have to write the code yourself. Below is the code which can be used to display categories, you can use it on the position you want
Code:
<?php
$categories = [];
foreach ($item->categories as $category)
{
$categoryUrl = JRoute::_(EventbookingHelperRoute::getCategoryRoute($category->id, $Itemid));
$categories[] = '<a href="' . $categoryUrl . '">' . $category->name . '</a>';
}
echo implode(',' , $categories);
?>
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 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.