pepperstreet VIP
Total posts: 3,837
16 Oct 2012 13:33

BTW... the mentioned topic is still in "Mighty Resources" section. Should it be re-created or moved to Cobalt ? Also, I am very interested in the article navigation (Drupal Book style navigation).


Sergey
Total posts: 13,748
16 Oct 2012 21:56

Hi sergey, what about the book module that you created ??

Was it read Also field presentation? It is there.

Hi sergey, what about the book module that you created ??

Also, I am very interested in the article navigation (Drupal Book style navigation).

Still cannot make navigation even in Cobalt 8. Still no solution.


Sergey
Total posts: 13,748
18 Oct 2012 03:52

I mean, a simple book navi like Drupal offers: Maybe top can be the Beginning of the "chapter"... which might be the surrounding category. Or the parent Category...

I want this feature to be there very much. But I do not see any way to create it in current Cobalt setup. I have been discussing it with gurus and still not solution.


Sergey
Total posts: 13,748
18 Oct 2012 08:22

The question is simple. How to I get ID of the next and previous record in the list using default or changed sorting order.

You are on the article page. You need to get ID of the next article in the list and previous. How do you make a query?


Sergey
Total posts: 13,748
22 Oct 2012 22:28

If it has a common and fixed book structure, there should be a DEFAULT sorting only. I don´t think a different sorting makes sense for a book->chapter->scene structure.

That is true. But how do I limit? It is not a Book it i a CCK and it have to work with any parameter combination.

If it has a common and fixed book structure, there should be a DEFAULT sorting only. I don´t think a different sorting makes sense for a book->chapter->scene structure.

How does the list view pagination work? Isn´t it a similar task? I mean, you are going n-th entries back and forth without a problem.

Similar but not. This is limit for list of the records and in nav case you need to get individual records relative to current one.

If it has a common and fixed book structure, there should be a DEFAULT sorting only. I don´t think a different sorting makes sense for a book->chapter->scene structure.

How does the list view pagination work? Isn´t it a similar task? I mean, you are going n-th entries back and forth without a problem.

I have to admit, I did not have a look into your DB structure and records logic... but aren't they indexed? Or some kind of sequential? BTW, isn´t it possible to "step" forth and back in the DB without knowing the actual ID of the next record?!? I remember, I did this many years ago on the IBM S36 and AS400 machines ;-) I wonder why MySQL should be inferior.

All your questions wil gone away when you try to create SQL query like this. It is possible but not if order is unpredictable. The ID has little to do with this. There sohould be index. Like 1,2,3,4 records something like ordering. And record ordering 1 may be id 10 and ordering 2 ID 1 and ordering 3 ID 100. But I can always get an ID of the next record. But if it is sorted by time or field who to I get it?


pepperstreet VIP
Total posts: 3,837
23 Oct 2012 05:21

But I can always get an ID of the next record. But if it is sorted by time or field who to I get it?

Thats why I split my request and question in two parts. Or call it steps. The default list order could be enough for a very simple navigation. I mean, without respecting the applied filters and sorting.

I remember, that in ME Resources Filter modes it was possible to keep the filters and sorting per category... am I right? How did you memorize this information? If you could keep it for the category lists, why not keep and carry this information over to the current article full view? So, if i am viewing an article, i know where i came from and what was the last sorting order and which were the last applied filters... (just thinking loud)


Sergey
Total posts: 13,748
24 Oct 2012 07:22

That was one of the idea. But then you have to start with article list to save index in session. But if you come from google directly to article page you do not have it is index.


pepperstreet VIP
Total posts: 3,837
24 Oct 2012 16:40

That was one of the idea. But then you have to start with article list to save index in session. But if you come from google directly to article page you do not have it is index.

Aargh, google ... you ruined my great idea ;-) How do you handle this case in Resources category lists with filters? I guess, you always start with the default sorting and no filters. Wouldn´t this work for articles as well ?

This is your comment from the other Book-field topic.

That was one of the idea. But then you have to start with article list to save index in session. But if you come from google directly to article page you do not have it is index.

Example? Ok, you have a recipes. By default they are sorted by time added. User search in google and get to the recipe page. He have to see at the bottom (or top depending on template) link

More recent recise (Cutlets) Older Recipe (Noodle)

But if use was in the recipes list and reordered it let's say by time to cook.

Quicker recipe (Cutlets) Slower recipe (Noodle)

the problem is how to I get ID or the article with should be next or previous.

Again, isn´t it possible to use the default sorting in this case? If the user is not coming from the category list view OR from another article view... use the default sorting/index.


Sergey
Total posts: 13,748
24 Oct 2012 21:20

I guess, you always start with the default sorting and no filters.

True but default sorting can also be very different.


Sergey
Total posts: 13,748
27 Oct 2012 07:02

Look, I cannot explain it is too technical. Just create SQL query. When you start solving this task you will understand what is the problem. There are also filters. You have to check if those were applied.


Sergey
Total posts: 13,748
29 Oct 2012 10:59

Right?

Yep :)

Powered by Cobalt