How to order Universal Module the same as fcpagenav?

More
4 years 1 month ago - 4 years 1 month ago #79516 by iamrobert
Hi,

In fcpagenav - my problem is I don't see a way to limit by type or add custom fields - so I decided to to go with Universal Module (UM) to show the previous or next item. But I can't get UM to order in the same way. Is it possible?


I can't work out how to dynamically order by fcpagenav - so that it displays the previous or next item in relation to the page or menu:



The fcpagenav field can't be chosen:



The best I have found is Random per view but it doesn't show the right view.

Any ideas?

Thanks,

Robert
Last edit: 4 years 1 month ago by iamrobert.

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

More
4 years 1 month ago #79520 by ggppdk
Hello

fcpagenav field uses the ordering of category view, it does this by
- creating an instance of category model
- and then uses it to get all (ordered) items ids of the category view that linked to the item (up to 50000 items ids aka the query is fast)
(these are cached based on current URL)

Then it only needs to retrieve the full item data for only next / previous item


Universal module uses its own SQL query
matching the ordering of the category view with that of universal module is not easy in the general case

The best would be to create a new "scope" for universal module, "Next / Previous items of current view"
- which would use same code as fcpagenav field to retrieve all item ids (ordered) of the category view that linked to the item , aka using an instance of category model to get items ids
- and then using the normal query of universal module to get item data


-- 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
4 years 1 month ago #79523 by iamrobert
Hi ggppdk,

Thanks for the detailed answer and I understand it better.

In this case, I will use the related field as its simpler and I'm only dealing with a few case studies.

I wrote a tutorial on customizing the related field as was struggling with how to use raw values:
www.flexicontent.org/forum/23-documentat...item-html-codes.html

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

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