Module Simple Portfolio Language Filter - Question | JoomShaper

Module Simple Portfolio Language Filter

VE

Vangelis Eftaxopoulos

Extension 2 years ago

Hello,

I recently purchased wimble for Joomla. I am trying to show portfolio items with simple portfolio module, but the items are not filtering with language (displays all items). I am using Joomla 4.1.

Thank you

0
5 Answers
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 2 years ago #65105

Hi there!

Thanks for your query.

Would you please describe it a little bit more? Actually, filtering options can be applied based on tags only as per my knowledge. That means, depending on your tags, items will be grouped.

Here is the related documentation link:

https://www.joomshaper.com/documentation/joomla-extensions/sp-simple-portfolio/displaying-a-portfolio-items

Best Regards

0
VE
Vangelis Eftaxopoulos
Accepted Answer
2 years ago #65121

Hi!

Maybe I didn't explain correctly. I have a multilingual site with two languages (Greek and English). When I am on portfolio page on greek language I expect to see only Greek portfolio items and the same when I am on english page. But I get all items on both pages. At least this is the expected result for most joomla modules. I also tried with different modules with different languages but I got the same result.

Thank you

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 year ago #72530

Hi,

Really sorry for the unwanted delay.

Would you please give me your site URL here?

Best Regards

0
VE
Vangelis Eftaxopoulos
Accepted Answer
1 year ago #105934

Hello,

Sorry for the late response.

0
VE
Vangelis Eftaxopoulos
Accepted Answer
1 year ago #106408

As I see you cannot find the error, so add after $db = Factory::getDbo(); in helper.php file the following code.

        $languageTag = JFactory::getLanguage()->getTag();
        $languageFilter = $db->Quote($languageTag).", ".$db->Quote('*');

        $query = $db->getQuery(true);

        $query->select('a.*, a.id AS spsimpleportfolio_item_id , a.tagids AS spsimpleportfolio_tag_id, a.created AS created_on')
        ->from($db->quoteName('#__spsimpleportfolio_items', 'a'))
        ->where($db->quoteName('a.published') . ' = 1');

        if ($languageFilter) {
           $query->where($db->quoteName('a.language') . ' IN (' . $languageFilter . ')');
        }
0