Skip to content

Support custom item count for calendarize_info preview - #840

Merged
lochmueller merged 2 commits into
lochmueller:mainfrom
kimleta:main
Aug 20, 2025
Merged

Support custom item count for calendarize_info preview#840
lochmueller merged 2 commits into
lochmueller:mainfrom
kimleta:main

Conversation

@kimleta

@kimleta kimleta commented Aug 14, 2025

Copy link
Copy Markdown
Contributor

Updated Register.php to allow overriding the number of items shown in the calendarize_info preview via the TCA parameters. Adjusted documentation to reflect the correct way to set the item count using the 'parameters' array.

Problem was that 1st, documention is wrong, the current documention says
image

But code is

        $GLOBALS['TCA'][$tableName]['columns']['calendarize_info'] = [
            'label' => 'LLL:EXT:calendarize/Resources/Private/Language/locallang.xlf:tca.information',
            'config' => [
                'type' => 'none',
                'renderType' => 'calendarizeInfoElement',
                'parameters' => [
                    'items' => 10,
                ],
            ],
        ];
        
        

Also for some reason I couldn't override your 10, so I did changes that 1st check is it set firstly in overrides or some other TCA, and if so, then use that custom number 1st and if not go to 10.

Documentaion is creally wrong, but for this other issue maybe its my problem, but please test it, becouse I had same problem on two websites.

Thanks

Updated Register.php to allow overriding the number of items shown in the calendarize_info preview via the TCA parameters. Adjusted documentation to reflect the correct way to set the item count using the 'parameters' array.

@lochmueller lochmueller left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Thanks for this change. Could you check the changes and I will directly merge after it.

Comment thread Classes/Register.php Outdated
Comment thread Classes/Register.php Outdated
@kimleta

kimleta commented Aug 20, 2025

Copy link
Copy Markdown
Contributor Author

@lochmueller Hi sorry, I didn't saw you responded. I updated code accordingly. How much I see I don't receive notice now, I followed your example.

Thanks.

@lochmueller
lochmueller merged commit 80b2497 into lochmueller:main Aug 20, 2025
0 of 7 checks passed
@lochmueller

Copy link
Copy Markdown
Owner

Thanks. Merged. Will be part of the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants