What's the recommended way to make the max item count of civi's recently viewed items stack configurable. Current value ist a constant MAX_ITEMS defined directly in CRM/Utils/Recent.php.

A quick glance at civicrm.settings.php lets me think that this is not the right place – stuff there seems to be more generic/low level.

Maybe it's possible to add a new field in admin/setting/misc (CRM_Admin_Form_Setting_Miscellaneous)?

So where to put this?

  • Could you explain this in more detail? I'm not clear what you are asking. – William Mortada Dec 23 '15 at 11:07
  • I want to implement a configuration option "recent_items_max_count" which adjusts the size of civi's last-viewed-items stack. I'm wondering where to store configuration options like this. The civicrm.settings.php seems to hold more basic variables. – nielo Dec 23 '15 at 13:34

You would need to patch CiviCRM to change this from a hardcoded constant into a setting.

Create a pull-request for this change and the core team will review it and merge it into 4.7.

See http://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference

  • Just found your reference ten minutes ago and came here to self-answer ;) Thanks a load! – nielo Jan 7 '16 at 20:25
  • So will you be sending in a PR for this? – Coleman Jan 8 '16 at 3:38
  • I'm just evaluating if I could add a new core setting without a dev installation. bin/regen.sh states that there's no setup.sh and as I read the script I saw it may truncate the database. So may I manually add the setting to table civicrm_setting to enable it? – nielo Jan 8 '16 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.