Important announcements from CouchCMS team
20 posts Page 1 of 2
Hi,

The type 'relation' editable region, as we know, shows all the pages to choose from in a single list (or dropdown).

Normally that is fine but it can be a bit unwieldy to work with if the number of pages is large.

@orbital contacted me a few days back with this problem. - one of his templates had nearly 40,000 cloned pages and, not surprisingly, it was nearly impossible for the user to choose specific pages from a list that large.

As a solution, I made some changes to the existing 'relation' type adding a new way of selecting pages.
It requires only adding a new parameter to any existing relation field as follows -
<cms:editable
name='test_rel'
type='relation'
masterpage='movies.php'
advanced_gui='1'
/>

After visiting the template as super-admin for the change to persist, you'll find that the relation field now displays the pages in a popup window that has pagination, folders and search to make it easier to work with any number of pages.

Here is @orbital testing things out with nearly 20,000 pages (he has a very large number of folders as well so perhaps that would require some tweaking too :) )-
scr.gif
scr.gif (108.46 KiB) Viewed 35712 times

If someone wishes to try it out, please download and use the latest version of Couch found at GitHub (https://github.com/CouchCMS/CouchCMS),

Do share your feedback.

Thanks.
Very useful work!
Thanks for this great work KK!

A small tip for those who will use this ... if possible use PHP 7 version because Couch works perfectly with it without any error or warning.

Thanks
Hi KK,

I see that orderby='page_name' order_dir='asc' no longer work,
Code: Select all
<cms:editable 
name='test_rel'
type='relation'
masterpage='movies.php'
advanced_gui='1'

orderby='page_name' order_dir='asc'

/>


But it would be good to be able to sort this way - orderby='page_name' order_dir='asc'.
Is this possible in the new advanced_gui='1'?

Can it also be turned off (disable) the third column of the modal window - page publish date?

Thank you
I would like to customize the modal window - for example, I would rename the 'Save' button to 'Add' button, because after clicking 'Save' I forgot to click 'Save' again on the page itself - so the newly added data was not saved.
for example, I would rename the 'Save' button to 'Add' button

Yes, I noticed that too. Will commit the change shortly.
orbital wrote: But it would be good to be able to sort this way - orderby='page_name' order_dir='asc'.
Is this possible in the new advanced_gui='1'?


Did you solve this? I also want to show pages sorted by title.
I see that orderby='page_name' order_dir='asc' no longer work,

Yes indeed that was an oversight on my part.
I have tried to rectify it now. Please get the modified addon (just one file actually - 'edit-relation.php') from GitHub https://github.com/CouchCMS/CouchCMS

@orbital, @trendoman
please test it and let me know if it does the job.

Hope it helps.
KK wrote: please test it and let me know if it does the job..

Thanks, after proposed change, advanced-gui list is sorted :) Also selection is sorted after page save and reload. Good job!
Hi all especially @KK...

first thanks for the great CMS!

i have a question, how to make modal on advanced gui relation looks the same as the list..?

ex here...

i have icon list with custom list view (look at the header : icons, it shows the image/icon)

Screen Shot 2018-05-05 at 23.21.12.png
list
Screen Shot 2018-05-05 at 23.21.12.png (41.39 KiB) Viewed 35009 times


but when i open the modal relation, it doesnt show my custom list view

- add item from relation

Screen Shot 2018-05-05 at 23.21.21.png
relation
Screen Shot 2018-05-05 at 23.21.21.png (11.36 KiB) Viewed 35009 times


- modal open up...but doesnt show the custom list view

Screen Shot 2018-05-05 at 23.21.25.png
modal
Screen Shot 2018-05-05 at 23.21.25.png (22.34 KiB) Viewed 35009 times


i hope someone can help me...
Hi @arimpranata :)
Thanks for the appreciation, I am glad you found Couch useful.

Replying to your query - I am afraid but the relation popup currently only shows the titles.
So, for now, I am sorry but we cannot customize it like the list-view.
20 posts Page 1 of 2
cron