By Guest on Tuesday, 28 March 2017
Replies 5
Likes 0
Views 1.2K
Votes 0
hell experts

when I filter my events by location I get a calendar that schows all events according to this location.
when I use the catergory-filter-legend at the calendar I lose the location-filter-result an get only the categories.

Is it somehow possible to get all the events filtered by location and category?

regards
Berndi
Hello Berndi,

You need to keep the JEvents Filter module on the page to keep the previous filter :-)

Many thanks
Tony
·
Wednesday, 29 March 2017 09:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Okay, I found the JEvents filter module and put it on the site.

The problem is, that the filter module dosen't get the location, when I use the "events by location" at the list of locations.

how can I pass the location to the filter module, when I use this way?

regards,
Berndi
·
Wednesday, 29 March 2017 12:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello !

I added some code to the calendar template to detect the shown location.
    $tgs_bla = get_object_vars($event);
$tgs_locations[] = $tgs_bla['_location'];

...

$hallencheck = 1;
$tgsinput = JFactory::getApplication()->input;

for ($tgs_count = 1; $tgs_count < count($tgs_locations); $tgs_count++) {
$hallencheck = ($tgs_locations[$tgs_count - 1] == $tgs_locations[$tgs_count]) ? $hallencheck + 1 : $hallencheck - 1;
}
if (count($tgs_locations) == $hallencheck) {
$tgsinput->set( 'TGSLOC', $tgs_locations[0] );
echo '<center><h1 id="TGSLOC" style="margin: 0 0 35px 0; font-weight: normal;">' . $tgs_locations[0] . '</h1></center>';
}
else {
$tgsinput->set( 'TGSLOC', NULL );
}

Now I can get my searchstring by calling
JFactory::getApplication()->input->getString('TGSLOC', null, 'string');


Where do I have to put this string, that it will be called automatically, when I call the searchmodule?

regards
Berndi
·
Friday, 31 March 2017 06:41
·
0 Likes
·
0 Votes
·
0 Comments
·
...and I found the Jevents-object wich contains the search-value

object(jevFilterProcessing)#1989 (7) {
["filters"]=> array(2) {
[0]=> object(jevLocationsearchFilter)#1984 (16) {
["filter_value"]=> string(0) ""
....


How can I write my string to the filter_value?
·
Friday, 31 March 2017 11:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

So you need to include the Locations filters in the filter module.

You can create your own filters too if you like. See:
https://www.jevents.net/docs/jevents/item/customizing-filters

Many thanks
Tony
·
Monday, 03 April 2017 09:47
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post