Forum for discussing general topics related to Couch.
6 posts Page 1 of 1
KK in list pages there are very few symbols displayed, the matter is I can I increase it (see att picture)

How can I increase it?

Attachments

It is probably best for @KK to answer about the new system, but there are 2 ways: 1st is to place something like count='50' in definition field. Not sure if it works this way, please try and let me know. 2nd way is to search for '…' in register.php in '_system' theme and change some value that is somewhere near - I've seen hardcoded '30', '48' - try changing it and see which one works and let us know :)
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Hi trendoman,
The only workable solution is as follows:
register.php
original
$count = $FUNCS->is_non_zero_natural( $count ) ? intval( $count ) : 48;
mod
$count = $FUNCS->is_non_zero_natural( $count ) ? intval( $count ) : 55;

The question is - this change dangerous is it for the normal operation of the script?
Thank you!
I guess it is absolutely safe. Enjoy :)
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Hi,

While we can certainly modify core code directly, doing so will mean that any future updates will overwrite your changes.

With v2.0, there are multiple ways of safely making the kind of change that you want without touching the core files.
For example, try this -

Place the following code in your 'couch/addons/kfunctions.php' file (rename the example file to this if the file does not exist)
Code: Select all
$FUNCS->add_event_listener( 'alter_pages_list_default_fields', 'my_alter_list_fields' );
function my_alter_list_fields( &$fields ){
    global $FUNCS;

    $route = $FUNCS->current_route;
    if( is_object($route) && $route->module=='pages' && $route->class=='KPagesAdmin' ){
        if( array_key_exists('k_page_title', $fields) ){
            $fields['k_page_title']['content']="<cms:render 'list_title' '10' />";
        }
    }
}

Change the '10' to whatever value you need for the count of characters.

This way your change will remain unaffected even with future upgrades.
Hope it helps.
I agree that it is better - thank you very much KK :D
6 posts Page 1 of 1