Second level order in Universal module is ignored

More
6 years 9 months ago - 6 years 9 months ago #68224 by yopyop001
Hi,

In FC, l have :
- A type called 'news' with a field : 'permanent' (0 or 1)
- A category called 'news'

In my home i want to display the latest news in a module.
I want to display first all the news with the field 'permanent' == 1 ordered by 'more recent first', and after the the news with the field 'permanent' == 0 ordered by 'more recent first'.

So, i have in my module parameters :
Order Level 1 => custom fields => Permanent => DESC => Integer
Order Level 2 => More recent first

But
It seems not order by the level 2.
So i have firstly the news with permanent == 1 but i don't understand the order for the other news (permanent ==0)

Not sure i'm clear...

In other words :
Is 'order Level 1' and 'order level 2 ' in module ocnfiguration like in sql query "order by level 1 [ASC,DESC], level 2 [ASC,DESC]" ?

Regards
Last edit: 6 years 9 months ago by yopyop001. Reason: Solved

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

More
6 years 9 months ago - 6 years 9 months ago #68226 by ggppdk
Hello

you can see the query in Joomla Debug console to see its exact format

or maybe this is easier, in file
modules/com_flexicontent/helper.php

Find:
Code:
$per_cat_query = str_replace('__CID_WHERE__', $cat_where, $items_query);

and after it add:
Code:
require_once(JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'librairies'.DS.'SqlFormatter'.DS.'SqlFormatter.php'); echo str_replace('PPP_', '#__', SqlFormatter::format(str_replace('#__', 'PPP_', $per_cat_query)))."<br/>";


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 6 years 9 months ago by ggppdk.

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

More
6 years 9 months ago #68230 by ggppdk
I have made a fix

parameter name should be similar to 1st level

so
Code:
<field name="orderby_2nd"

should be changed
Code:
<field name="ordering_2nd"

Parameter name was wrongly copied from category / search view code where it is 'orderby_2nd'
So after chaning the XML file , then re-edit module configuration , set 2nd level order again and save


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
6 years 9 months ago #68236 by yopyop001
Nice, thanks a lot.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.324 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline