help to better help you:

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

Feature request: simplelist with categories choice

Re: Feature request: simplelist with categories choice

11 years 6 months ago
#9436
Filter by Type wasn't working for me. I am not sure why, didn't bother troubleshooting it.

Mod I made are as follows:

In models\eventlists.php

Before
Code:
return $where;
Add
Code:
if ($params->get('filter')) { $filter = JRequest::getString('category', '', 'request'); if ($filter) { // clean filter variables $filter = JString::strtolower($filter); $filter = $this->_db->Quote( '%'.$this->_db->getEscaped( $filter, true ).'%', false ); $where .= ' AND LOWER( c.catname ) LIKE '.$filter; } }

Than I needed to filter by state.. so I thought about it and wondered if it would work..

I added:
Code:
if ($params->get('filter')) { $filter = JRequest::getString('state', '', 'request'); if ($filter) { // clean filter variables $filter = JString::strtolower($filter); $filter = $this->_db->Quote( '%'.$this->_db->getEscaped( $filter, true ).'%', false ); $where .= ' AND LOWER( l.state ) LIKE '.$filter; } } if ($params->get('filter')) { $filter = JRequest::getString('city', '', 'request'); if ($filter) { // clean filter variables $filter = JString::strtolower($filter); $filter = $this->_db->Quote( '%'.$this->_db->getEscaped( $filter, true ).'%', false ); $where .= ' AND LOWER( l.city ) LIKE '.$filter; } }

Now I am able to filter by ?category={category name}&state={state name}&city={city name}
The following user(s) said Thank You: jojo12

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

Time to create page: 0.493 seconds