Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
originally posted this in:
https://www.couchcms.com/forum/viewtopic.php?f=5&t=10241&start=230

Hi,
I'm trying to add the k_up_down field to the manage folders area of a particular template.

so far i've created a content_list_inner_folders__folder_shop-php.html which targets the particular template, but i cannot figure out how to add the k_up_down field selectively and get it to work.

I've tried adding it to the defaults in edit-folders.php:
Code: Select all
       function _default_list_fields(){
            global $FUNCS;
            $arr_fields = array();

            // other fields removed for brevity

            $arr_fields['k_up_down'] =
                array(
                    'weight'=>'40',
                    'header'=>' ',
                    'class'=>'up-down',
                    'content'=>"<cms:render 'list_updown' />",
                    'sortable'=>'0',
                    'sort_name'=>'weight',
                    'listener'=>array( 'pages_list_post_action', array($this, '_updown_handler') ),
                );

            // other fields removed for brevity

            return $arr_fields;

Which adds the column (but to all templates). But does not function.
Which led to investigating the _updown_handler, which doesn't exists in KFoldersAdmin class.

So,

1 - is it possible at all?
2 - can the field be added selectively (per template) in some way?
3 - if i have a go at the handler any pointers?

thanks to all and any who might help :)
Hi,

It will also require adding code for the handler to actually set the order of the folders involved when the up-down buttons are clicked - but I suppose you already found out that
Which led to investigating the _updown_handler, which doesn't exists in KFoldersAdmin class.
2 posts Page 1 of 1