- Posts: 5
- Thank you received: 0
Filter Events by Categories in Calendar View
- hejeva
- Topic Author
- Offline
- New Member
-
Less
More
13 years 5 months ago - 13 years 5 months ago #12033
by hejeva
Filter Events by Categories in Calendar View was created by hejeva
Is it possible to filter the events by categories in Calendar view?
Do something like this: index.php?option=com_eventbooking&task=view_calendar&category_id=1
or even better: in the Calendar have a dropdown to of categories when you user selects a category they only see the events for that category in the calendar.
Thanks
Do something like this: index.php?option=com_eventbooking&task=view_calendar&category_id=1
or even better: in the Calendar have a dropdown to of categories when you user selects a category they only see the events for that category in the calendar.
Thanks
Last edit: 13 years 5 months ago by hejeva.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
13 years 5 months ago #12039
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Filter Events by Categories in Calendar View
Hi
If you want to show calendar of events from a category only, please create a menu item to link to Calendar Category Layout of Event Booking, choose the category you want to display from menu parameter and it will work as expected .
Regards,
Tuan
If you want to show calendar of events from a category only, please create a menu item to link to Calendar Category Layout of Event Booking, choose the category you want to display from menu parameter and it will work as expected .
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- hejeva
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
13 years 5 months ago #12060
by hejeva
Replied by hejeva on topic Re: Filter Events by Categories in Calendar View
Thanks, totally missed that..
A suggestion to put at the bottom of the table (it could be optional setting) is a link to each category or selector. I have added code so each of my category is listed and links can be modified by css.
Code to add underneath table in: components\com_eventbooking\views\calendar\tmpl\default.php
<ul>
<?php $db = & JFactory::getDBO() ;
$sql = 'SELECT * FROM #__eb_categories' ;
$db->setQuery($sql) ;
$rows = $db->loadObjectList() ;
if (count($rows)) {
foreach ($rows as $row) {
$mylink = JText::_('index.php?option=com_eventbooking&task=view_category&layout=calendar&category_id=' . $row->id); ?>
<li><div id="category-<?php echo $row->id; ?>">
<a href="<?php echo $mylink; ?>"> <?php echo $row->name; ?> </a>
</div></li>
<?php
}
}
?>
</ul>
code to add underneath table in: components\com_eventbooking\views\category\tmpl\calendar.php
<ul>
<li><a href="<?php echo JText::_('index.php?option=com_eventbooking&task=view_calendar') ?>">Main Calendar</a></li>
<?php $db = & JFactory::getDBO() ;
$sql = 'SELECT * FROM #__eb_categories' ;
$db->setQuery($sql) ;
$rows = $db->loadObjectList() ;
if (count($rows)) {
foreach ($rows as $row) {
$mylink = JText::_('index.php?option=com_eventbooking&task=view_category&layout=calendar&category_id=' . $row->id);
if ($row->id != $this->category->id) { ?>
<li><div id="category-<?php echo $row->id; ?>">
<a href="<?php echo $mylink; ?>"> <?php echo $row->name; ?> </a>
</div></li>
<?php } ?>
<?php
}
}
?>
</ul>
A suggestion to put at the bottom of the table (it could be optional setting) is a link to each category or selector. I have added code so each of my category is listed and links can be modified by css.
Code to add underneath table in: components\com_eventbooking\views\calendar\tmpl\default.php
<ul>
<?php $db = & JFactory::getDBO() ;
$sql = 'SELECT * FROM #__eb_categories' ;
$db->setQuery($sql) ;
$rows = $db->loadObjectList() ;
if (count($rows)) {
foreach ($rows as $row) {
$mylink = JText::_('index.php?option=com_eventbooking&task=view_category&layout=calendar&category_id=' . $row->id); ?>
<li><div id="category-<?php echo $row->id; ?>">
<a href="<?php echo $mylink; ?>"> <?php echo $row->name; ?> </a>
</div></li>
<?php
}
}
?>
</ul>
code to add underneath table in: components\com_eventbooking\views\category\tmpl\calendar.php
<ul>
<li><a href="<?php echo JText::_('index.php?option=com_eventbooking&task=view_calendar') ?>">Main Calendar</a></li>
<?php $db = & JFactory::getDBO() ;
$sql = 'SELECT * FROM #__eb_categories' ;
$db->setQuery($sql) ;
$rows = $db->loadObjectList() ;
if (count($rows)) {
foreach ($rows as $row) {
$mylink = JText::_('index.php?option=com_eventbooking&task=view_category&layout=calendar&category_id=' . $row->id);
if ($row->id != $this->category->id) { ?>
<li><div id="category-<?php echo $row->id; ?>">
<a href="<?php echo $mylink; ?>"> <?php echo $row->name; ?> </a>
</div></li>
<?php } ?>
<?php
}
}
?>
</ul>
Please Log in or Create an account to join the conversation.
- Rusty
- Offline
- Senior Member
-
Less
More
- Posts: 66
- Thank you received: 1
3 years 6 months ago #146882
by Rusty
Replied by Rusty on topic Filter Events by Categories in Calendar View
Now the extension is using Themes, whats the up to date method of doing this please?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
3 years 6 months ago #146884
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Filter Events by Categories in Calendar View
Hello Rusty
The file is now in this new location components/com_eventbooking/themes/default/calendar/default.php. Somehow, you will need to write code yourself to add the categories filter to have it works in the way you want
Regards,
Tuan
The file is now in this new location components/com_eventbooking/themes/default/calendar/default.php. Somehow, you will need to write code yourself to add the categories filter to have it works in the way you want
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 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.