[SOLVED] Module Universal - How to use the order of specified items (Item SCOPE)

More
7 years 5 months ago - 7 years 5 months ago #64682 by juansolos
Hello,
i use universal module to display 3 articles. This 3 articles are selected by id in the article selection tab.
How to desable all article order to get the order of my selection?

id1,id2,id3 if i have set id1,id2,id3 in the article selection tab

id2,id1,id3 if i have set id2,id1,id3 in the article selection tab
...

Regards
Last edit: 7 years 5 months ago by ggppdk.

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

More
7 years 5 months ago - 7 years 5 months ago #64687 by ggppdk
Hello

good question, currently there is no option for this

but this valid / useful usage question !

- indeed if someone decides to display ONLY specific items,
then usually he would want to also set a manual order

I understand that these items maybe from different categories and also even if they are from same category, we may not want to tamper with the "ordering" inside the category

- i wonder if we always use the selected order, or if we need a parameter for this

Still i am not sure if this is easy to do in combination, with other SCOPEs , e.g. you may combine the item scope with the DATE scope, etc


I think since we always retrieve ids and then data,

It is enough to
1. Strip the ID not matchings from the given IDs of item scope
2. Then use:
' ORDER BY FIELD(i.id, '. implode(',', $ordered_found_ids) .')';


-- 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: 7 years 5 months ago by ggppdk.

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

More
7 years 5 months ago - 7 years 5 months ago #64701 by juansolos
Hello,
thanks
Is there a way to modify anything in the php file of module template (an overide of news.php)?

Maybe in the $list[$ord]?

Regards
Last edit: 7 years 5 months ago by ggppdk.

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

More
7 years 5 months ago - 7 years 5 months ago #64703 by ggppdk
Hello

actually i am thinking to add this

(by adding a parameter to respect the order of selected items)

i have already made the change locally for:
- "items scope" in "INCLUDE" (specific items) mode

will take time later to test it


-- 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: 7 years 5 months ago by ggppdk.

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

More
7 years 5 months ago - 7 years 5 months ago #64767 by ggppdk
Hello

as i said, i think we can make this the default behaviour
(even if we add new parameter the default would be to respect the order)
Code:
. ' GROUP BY i.id' . $orderby

Replace with:
Code:
. ' GROUP BY i.id' . (!$behaviour_items && $method_items == 3 ? ' ORDER BY FIELD(i.id, '. $items .')' : $orderby)


-- 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: 7 years 5 months ago by ggppdk.

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

More
7 years 5 months ago - 7 years 5 months ago #64768 by ggppdk
Hello

i commited new parameter, but made default to be OFF:
github.com/FLEXIcontent/flexicontent-cck...5d0963bfa1e9442dbb5b

So remember to enable when you upgrade to future version


-- 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: 7 years 5 months ago by ggppdk.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.318 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