help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

Calendar : how to filter categories on calendar menu item type?

Calendar : how to filter categories on calendar menu item type?

5 years 10 months ago - 5 years 10 months ago
#26630
Hi,

I had to translate events in a multilingual site (French + UK)
As JEM does not comply with the Joomla multilingual language feature, I had to duplicate French categories + events and translate them in English. So for each event I have 2 items (1 Fr and 1 UK)

It worked fine… until I saw the global calendar:
index.php?option=com_jem&view=calendar
where of course all the events are shown. So all twice: 1 French, 1 UK
It's just normal but unwanted... I'd like to show a French calendar or a UK calendar.

As far as I know, there’s no parameter to set for this menu item type to filter categories/events to be shown
(I know the Calendar Legend at the bottom of the page, were you can filter categories. But I'd like categories to be already filtered at page loading...)

What do you suggest to me?

Override this file /components/com_jem/views/calendar/tmpl/default.php
check the user language choosen by user and filter categories ids that should be displayed?

Thanks for your help
PAul
Last edit: 5 years 10 months ago by Mister PAul.

Please Log in or Create an account to join the conversation.

Re: Calendar : how to filter categories on calendar menu item type?

5 years 10 months ago
#26631
There is a calendar for a category. So you cab create one for english category and one for french. I think, this should help
The following user(s) said Thank You: Mister PAul

Please Log in or Create an account to join the conversation.

Re: Calendar : how to filter categories on calendar menu item type?

5 years 10 months ago - 5 years 10 months ago
#26632
It's a good idea!
But do you think that I'll get the subcategorie name and color?

There will be:
category 1 French
- subcategory fr 1 green
- subcategory fr 2 yellow
- ...

category 2 English
- subcategory uk 1 green
- subcategory uk 2 yellow
- ...
Last edit: 5 years 10 months ago by Mister PAul.

Please Log in or Create an account to join the conversation.

Re: Calendar : how to filter categories on calendar menu item type?

5 years 10 months ago
#26633
I don't know and never tried, if this works.

Please Log in or Create an account to join the conversation.

Re: Calendar : how to filter categories on calendar menu item type?

5 years 10 months ago - 5 years 10 months ago
#26634
Hum... it seems to work...
if I set 2 global "master" categories: French and English,
and give to each event one of these master categories + it's own sub category,
then I get all the French or English category events are listed in the calendar and with the subcategory color !...
:)
I'll try to deploy it tomorrow and report here.
Thanks
Last edit: 5 years 10 months ago by Mister PAul.

Please Log in or Create an account to join the conversation.

Re: Calendar : how to filter categories on calendar menu item type?

5 years 10 months ago
#26641
It works but I have more than 100 events to edit:
I have to add to each one it’s « mother » category (French or English) depending of it’s actual category.

I’d prefer do a PHP / myySQL script to automate that, no ?

I should have to create a php/SQL request that would parse the table `jem_cats_event_relations` from the id ‘7000` (before, they are passed events), copy the `catid` and just depending of the French/UK belonging ids, add a new line for this `itemid` with the French or UK catid

Could I do that directly with phpMyAdmin or should I create a php file with the whole script (if… then…)?
And if you could guide me a little bit, I would be grateful.
;-)

Thanks for your help
PAul

Please Log in or Create an account to join the conversation.

Time to create page: 0.925 seconds