Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
13 posts Page 2 of 2
Adding to my previous post - If somehow I fail to write the expected SQL or the final result would not be comfortable to work with, I have another Ace up my sleeve - fetch pages limited by current pagination. In a rough sketch the idea behind 'paginated' navigation is presented -
2019-04-13-123717.png
Paginated?
2019-04-13-123717.png (12.16 KiB) Viewed 1142 times

In my opinion it sucks, but maybe it could save the day? We'll see...

My Documentation, Addons, Functions.
Join COUCH telegram channel
Great news!

I was overestimating the blow of database's network transfer of a huge array with results back to PHP. Not a big deal, if done right, at least on 100k of pages. Query (from my post earlier today) is perfectly indexed. I can foresee some slowdown on 1m of records, but at that point more knowledge can be invested in extending the SQL to avoid the data transfer to client. I am not that knowledgeable, unfortunately (but if you follow, I am working on it :) ).

It was worth a trial to actually send results to PHP and see the impact. Average query result is within 0.20 sec. - uploaded the video here https://send.firefox.com/download/c7a1a ... Cd9YeIxf1A

To recap, the navigation respects settings from <cms:config_list_view /> (if present) and actually scans through all pages without hard limit, position is the same as in backend. Thanks for attention (if any) :)

P.S. It would be amazing to support custom editables for orderby and dynamic order when we click on column's header in backend and reorder pages. However, I am totally satisfied with current code. If anyone needs custom orderby, contact me any time.

My Documentation, Addons, Functions.
Join COUCH telegram channel
Took a while to fight the backend, but was able to attach the navbar to all cloned templates automatically (in theme) + make it collapsible, just like a group and save state in a cookie. Current look in screenshot -
2019-04-13-221946.png
Expanded
2019-04-13-221946.png (30.08 KiB) Viewed 1136 times

2019-04-13-222409.png
Collapsed
2019-04-13-222409.png (22.92 KiB) Viewed 1136 times

My Documentation, Addons, Functions.
Join COUCH telegram channel
13 posts Page 2 of 2