Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,221 of 9,224 pages
About the help in other languages
All help pages

Hide notices automatically on a date

Step by step - let editors give each notice a hide date and have Exponential's hide.php cronjob hide it when the date has passed, by adding a date attribute to the class and configuring content.ini [HideSettings].

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/tasks/compliance/hide-notices-automatically-on-a-date.md

On this page

Hide notices automatically on a date

For administrators and developers. The kernel's cronjob script hide.php (in the default cronjob part) hides objects of chosen classes whose date attribute has passed; it does nothing until configured. Hidden notices stay in the tree with their history and can be revealed (Archiving old notices).

Contents

  1. Before you start
  2. Steps
  3. Check that it worked
  4. Related pages

Before you start

  • The class of the notices (for example identifier notice) and the node id of the folder that holds them.
  • Rights to edit classes; access to settings.
  • The default cronjob part runs on the server (php runcronjobs.php from the crontab).

Steps

  1. Setup > Classes, edit the notice class, add an attribute of the date (or date and time) datatype with the identifier hide_date, name "Hide on". Store.

  2. In settings/override/content.ini.append.php:

    [HideSettings]
    RootNodeList[]
    RootNodeList[]=<node id of the notices folder>
    HideDateAttributeList[]
    HideDateAttributeList[notice]=hide_date
  3. Clear the INI cache.

  4. Tell editors to fill "Hide on" when they publish a notice.

Do not confuse with unpublish.php and [UnpublishSettings], which move objects with a passed unpublish_date to the trash; for records, hiding is the safer choice.

Check that it worked

  1. Publish a test notice with a hide date in the past, in a test folder under the configured root.
  2. Run the default part by hand: php runcronjobs.php -q, or only the script: the output lists "Hiding node: ...".
  3. The notice shows Hidden in the administration and is gone from the public site; the audit records content.node.hide.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x