Category field (and link) in timeline view
- Philipp
- Topic Author
- Offline
- Senior Member
-
Less
More
9 years 6 months ago - 9 years 6 months ago #87316
by Philipp
Category field (and link) in timeline view was created by Philipp
Hi there,
I'm new here, migrating from another extension, and I really like what I see so far. As I am customizing my timeline view, I have a (maybe very simple) question:
How can I put the category name of an event into the timeline view? I have looked for customization options in the forum threads, and also for hooks on the template files, but I cannot use those from "categories.php" in "events_timeline.php", right? Pasting this snippet into timeline.php gave no output:
So I guess I have to pull this from the DB, but this is clearly beyond my php and programming abilities (without some kickstart, that is). Any luck?
Thanks, Johanna
I'm new here, migrating from another extension, and I really like what I see so far. As I am customizing my timeline view, I have a (maybe very simple) question:
How can I put the category name of an event into the timeline view? I have looked for customization options in the forum threads, and also for hooks on the template files, but I cannot use those from "categories.php" in "events_timeline.php", right? Pasting this snippet into timeline.php gave no output:
Code:
<h3 class="eb-category-title">
<a href="<?php echo JRoute::_(EventbookingHelperRoute::getCategoryRoute($category->id, $Itemid)); ?>" class="eb-category-title-link">
<?php
echo $category->name;
if ($config->show_number_events) {
?>
<small>( <?php echo $category->total_events ;?> <?php echo $category->total_events == 1 ? JText::_('EB_EVENT') : JText::_('EB_EVENTS') ; ?> )</small>
<?php
}
?>
</a>
</h3>
Thanks, Johanna
Last edit: 9 years 6 months ago by Philipp.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 6 months ago #87323
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Category field (and link) in timeline view
Hi Johanna
Try to use this code
That should display category of the event in timeline layout properly
Tuan
Try to use this code
Code:
<h3 class="eb-category-title">
<a href="<?php echo JRoute::_(EventbookingHelperRoute::getCategoryRoute($event->category_id, $Itemid)); ?>" class="eb-category-title-link">
<?php echo $event->category_name; ?>
</a>
</h3>
That should display category of the event in timeline layout properly
Tuan
The following user(s) said Thank You: Philipp
Please Log in or Create an account to join the conversation.
- Philipp
- Topic Author
- Offline
- Senior Member
-
9 years 6 months ago #87358
by Philipp
Replied by Philipp on topic Category field (and link) in timeline view
Perfect, many 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.