se7enxweb / openpa
OpenPA: the OpenContent toolkit for Italian public administration websites on Exponential (sito istituzionale, Amministrazione Trasparente, organigramma, Apps section, SEO, automatic state and section changes).
Package info
Type:ezpublish-legacy-extension
pkg:composer/se7enxweb/openpa
Fund package maintenance!
Requires
- aws/aws-sdk-php: 3.*
- predis/predis: ^2.0@dev
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 3.18.7
- 3.18.6
- 3.18.5
- 3.18.4
- 3.18.3
- 3.18.2
- 3.18.1
- 3.18.0
- 3.17.0
- 3.16.2
- 3.16.1
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.7
- 3.13.6
- 3.13.5
- 3.13.4
- 3.13.3
- 3.13.2
- 3.13.1
- 3.13.0
- 3.12.6
- 3.12.5
- 3.12.4
- 3.12.3
- 3.12.2
- 3.12.1
- 3.12.0
- 3.11.1
- 3.11.0
- 3.10.8
- 3.10.7
- 3.10.6
- 3.10.5
- 3.10.4
- 3.10.3
- 3.10.2
- 3.10.1
- 3.10.0
- 3.9.12
- 3.9.11
- 3.9.10
- 3.9.9
- 3.9.8
- 3.9.7
- 3.9.6
- 3.9.5
- 3.9.4
- 3.9.3
- 3.9.2
- 3.9.1
- 3.9.0
- 3.8.6
- 3.8.5
- 3.8.4
- 3.8.3
- 3.8.2
- 3.8.1
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5
- 3.4.1
- 3.4
- 3.3
- 3.2.2
- 3.2.1
- 3.2
- 3.1
- 3.0.2
- 3.0.1
- 3.0
- 2.43.4
- 2.43.3
- 2.43.2
- 2.43.1
- 2.43.0
- 2.42.0
- 2.41.5
- 2.41.4
- 2.41.3
- 2.41.2
- 2.41.1
- 2.41.0
- 2.40.1
- 2.40.0
- 2.39.8
- 2.39.7
- 2.39.6
- 2.39.5
- 2.39.4
- 2.39.3
- 2.39.2
- 2.39.1
- 2.39.0
- 2.38.2
- 2.38.1
- 2.38.0
- 2.37.6
- 2.37.5
- 2.37.4
- 2.37.3
- 2.37.2
- 2.37.1
- 2.37.0
- 2.36.1
- 2.36
- 2.35
- 2.34
- 2.33.1
- 2.33
- 2.32.1
- 2.32
- 2.31.2
- 2.31.1
- 2.31
- 2.30.3
- 2.30.2
- 2.30.1
- 2.30
- 2.29
- 2.28.1
- 2.28
- 2.27.4
- 2.27.3
- 2.27.2
- 2.27.1
- 2.27
- 2.26.6
- 2.26.5
- 2.26.4
- 2.26.3
- 2.26.2
- 2.26.1
- 2.26
- 2.25.3
- 2.25.2
- 2.25.1
- 2.25
- 2.24.1
- 2.24
- 2.23
- 2.22.5
- 2.22.4
- 2.22.3
- 2.22.2
- 2.22.1
- 2.22
- 2.21
- 2.20
- 2.19.5
- 2.19.4.1
- 2.19.4
- 2.19.3
- 2.19.2
- 2.19.1
- 2.19
- 2.18.4
- 2.18.3.3
- 2.18.3.2
- 2.18.3.1
- 2.18.3
- 2.18.2
- 2.18.1
- 2.18
- 2.17.1
- 2.17
- 2.16.9
- 2.16.8
- 2.16.7
- 2.16.6
- 2.16.5
- 2.16.4
- 2.16.3
- 2.16.2
- 2.16.1
- 2.16
- 2.15
- 2.14.1
- 2.14
- 2.13.5
- 2.13.4
- 2.13.3
- 2.13.2
- 2.13.1
- 2.13
- 2.12
- 2.11.5
- 2.11.4
- 2.11.3
- 2.11.2
- 2.11.1
- 2.11
- 2.10.24
- 2.10.23
- 2.10.22
- 2.10.21
- 2.10.20
- 2.10.19
- 2.10.18
- 2.10.17
- 2.10.16
- 2.10.15
- 2.10.14
- 2.10.13
- 2.10.12
- 2.10.11
- 2.10.10
- 2.10.9
- 2.10.8
- 2.10.7
- 2.10.6
- 2.10.5
- 2.10.4
- 2.10.3.3
- 2.10.3.2
- 2.10.3.1
- 2.10.3
- 2.10.2.1
- 2.10.2
- 2.10.1
- 2.10
- 2.8.6
- 2.8.5
- 2.8.4
- 2.8.3
- 2.8.2
- 2.8.1
- 2.8
- 2.7.2
- 2.7.1
- 2.7
- 2.6.3
- 2.6.2
- 2.6.1
- 2.6
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4
- 2.3.2
- 2.3.1
- 2.3
- 2.2
- 2.1.1
- 2.1
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0
- 1.2
- 1.1
- 1.0.3
- 1.0.2
- 1.0.1
- dev-version3
- dev-version1
- dev-more-cache-in-s3
- dev-dev-cluster
- dev-redis-log
- dev-mail_settings
- dev-feature/exception_handler
- dev-clustering
- dev-fix_class_relation_gui
- dev-fix_php_construct
- dev-organigramma_log
- dev-children_view_datatype
- dev-default_services_tpl
- dev-backend_page_handler
- dev-full_block
This package is auto-updated.
Last update: 2026-10-22 07:54:51 UTC
README
OpenPA is the toolkit OpenContent built for the websites of Italian public administrations
(municipalities, unions of municipalities, local agencies) on the Exponential legacy kernel. It brings the
building blocks such a site needs: the "Amministrazione Trasparente" (transparency) section and its admin tab,
an "Apps" section with its own admin tab, the organization chart (organigramma), roles and staff lookups,
SEO and cookie settings, reCAPTCHA keys, automatic changes of object state and section when content expires,
menu caching, a robots.txt and a sitemap.xml, plus many template operators and fetch functions used by
the OpenPA designs.
The extension, its settings and its templates are in Italian, as the project is. This guide is in English; a short Italian summary is at the end (Sommario in italiano).
Who it is for: integrators who run or migrate an OpenPA site on Exponential 6.x, and developers who want to reuse its operators, fetch functions or workflow events.
Contents
- Requirements
- Installation
- What it adds
- Configuration
- Usage
- Permissions
- Cron jobs and scripts
- Upgrading
- Known limits
- Troubleshooting
- Contributing
- License and credits
- Sommario in italiano
Requirements
- Exponential 6.x (legacy kernel) on PHP 8.0 or later.
- The extensions named in
extension.xml:ezmultiupload(required);ezwebin,ezjscoreandwrap_operator(extended). - Optional, used by parts of the code when present: eZ Find / Solr (search operators, the
index_pending,update_class_pendingandrename_objectcron jobs), eZ Flow (the block handlers and theezflowcustomblockupdateworkflow event), eZ Tags, and an extension that providesOcReCaptchaType(reCAPTCHA validation).
Installation
With Composer
composer require se7enxweb/openpa
The legacy installer places the package in extension/openpa.
By hand
cd /path/to/exponential
git clone https://github.com/se7enxweb/openpa.git extension/openpa
Activate it
Add the extension to settings/override/site.ini.append.php:
[ExtensionSettings]
ActiveExtensions[]=openpa
Then regenerate the autoloads and clear the caches:
php bin/php/ezpgenerateautoloads.php -e php bin/php/ezcache.php --clear-all
What it adds
| Part | Where | What |
|---|---|---|
| Admin tab "Apps" | settings/menu.ini.append.php [Topmenu_apps] |
Opens apps/dashboard; shown with the puzzle icon in admin4. |
| Admin tab "Amministrazione Trasparente" | [Topmenu_trasparenza] |
Opens the Amministrazione-Trasparente URL alias; shown with the journal-text icon in admin4. |
| Setup menu links | [Leftmenu_setup] |
"Impostazioni SEO" (openpa/seo), automatic state change settings, automatic section change settings. |
| Modules | modules/ |
openpa, apps, robots.txt, sitemap.xml (see Usage). |
| Template operators | autoloads/eztemplateautoload.php |
About 55 operators (see below). |
| Fetch functions | modules/openpa/function_definition.php |
fetch( 'openpa', ... ), 21 functions. |
| Workflow events | eventtypes/event/ |
8 event types (see below). |
| Cache items | settings/site.ini.append.php [Cache] |
openpamenu, openpadynamicini, openpacontextdata, openpaorganigramma, all tagged openpa. |
| Translations | translations/ita-IT |
Italian. |
| Designs | design/standard, design/admin2 |
Templates for the site and the admin interface. |
The Icon= lines name icons from the kernel's design.ini [AdminDesignSettings] IconList[]; a design that
does not read Icon= ignores them.
Configuration
All settings follow the usual rule: never edit the files in extension/openpa/settings, put your changes in an
override such as settings/override/openpa.ini.append.php or a siteaccess file.
openpa.ini
settings/openpa.ini holds the defaults; settings/openpa.ini-dist lists the node and link settings a site
usually overrides. The main blocks:
| Block | Purpose |
|---|---|
[ObjectHandlerServices] |
The services behind the object_handler operator (content_main, control_menu, content_gallery ...). |
[AttributeHandlers], [BlockHandlers], [DataHandlers] |
PHP classes per datatype/attribute, per block type/view, and per openpa/data handler (politici, map_markers, partecipazioni, tree). |
[CacheSettings] |
Menu=enabled turns the menu cache on. |
[ContentMain], [Attributi] |
Which attributes count as image, abstract and full text. |
[Seo] |
Google Analytics, robots, meta tags; edited at openpa/seo and stored in the database (site data SeoSettings). |
[LinkSpeciali], [Nodi], [TopMenu], [SideMenu], [ExtraMenu] |
Node ids for special pages and the menus. |
[GestioneClassi], [GestioneAttributi], [GestioneSezioni] |
Class, attribute and section lists used by the templates. |
[MotoreDiRicerca], [MotoreRicerca] |
Search form settings. |
[ChangeState], [ChangeSection] |
Rules for the change_state and change_section cron jobs. |
[NetworkSettings] |
PrototypeUrl: where openpa/class and the class installer fetch class definitions from. |
Example override:
<?php /* #?ini charset="utf-8"? [CacheSettings] Menu=enabled [LinkSpeciali] NodoContattaci=1234 NodoPrivacy=1240 [ChangeSection] ToSectionDefault=oggetti_scaduti ToSection[bando]=oggetti_scaduti */ ?>
Settings are read through OpenPAINI::variable(), which serves some of them (the Seo keys,
GeneralSettings::theme and a few more) from the database instead of the INI file.
Automatic state change
[ChangeState] Rules[]=deliberazione|deliberazione_archivia [ChangeStateRule-deliberazione_archivia] CurrentState=albotelematico.visibile DestinationState=albotelematico.archivioricercabile # <attribute_identifier>;<operator>;<value>, operator eq, gt, ge, lt, le; value NOW, TODAY or a string Conditions[]=data_finepubblicazione;lt;TODAY
The same rules can be maintained in the admin at openpa/changestatesettings.
Automatic section change
[ChangeSection] maps each class to a target section (ToSection[<class>], default ToSectionDefault), the
date attribute that decides expiry (DataTime[<class>]), an optional lifetime in seconds
(ScadeDopoTotSecondi[<class>]) and the subtree to scan (RootNodeList[<class>]). The admin view is
openpa/changesectionsettings.
Other INI files
The extension also ships settings for menu.ini, module.ini, site.ini, content.ini, design.ini,
override.ini, template.ini, workflow.ini, cronjob.ini, ezjscore.ini, ezfind.ini, image.ini,
dashboard.ini, zone.ini, squid.ini and others in settings/. block.ini.append.php_move_to_siteaccess
is a block definition meant to be copied into a siteaccess, not read from the extension.
Usage
Admin tabs
After activation the admin header shows two extra tabs. In admin4 "Apps" carries the puzzle icon and
"Amministrazione Trasparente" the journal-text icon.
- Apps opens
apps/dashboard, the full view of the site's Apps container. On first use it installs theapps_containerclass (fromPrototypeUrl), creates the "Apps" section and publishes the container object. - Amministrazione Trasparente opens the node with the URL alias
Amministrazione-Trasparente.
Module views
| URL | Policy | What it does |
|---|---|---|
openpa/seo |
openpa/seo |
SEO settings: analytics ids, robots, meta tags. |
openpa/recaptcha |
openpa/recaptcha |
reCAPTCHA v2 and v3 keys. |
openpa/theme |
openpa/theme |
Choose the site theme. |
openpa/changestatesettings, openpa/changesectionsettings |
same names | Rules for the automatic changes. |
openpa/class/<ID>, openpa/classlist, openpa/classbydatatype/<datatype>, openpa/classsettings/<identifier> |
openpa/class |
Compare and sync classes with the prototype. |
openpa/classdefinition/<ID>, openpa/classes, openpa/relations/<ID> |
openpa/classdefinition |
Class definitions as data. |
openpa/roles |
openpa/manage_roles |
Role management. |
openpa/add/<class>, openpa/addlocationto/<objectID>, openpa/refreshmenu, openpa/refreshorganigramma, openpa/block/<blockID>/<view>, openpa/settings |
openpa/editor_tools |
Editor helpers. |
openpa/calendar/<nodeID> |
openpa/calendar |
Calendar data for a node. |
openpa/data/<handler>, openpa/loadwt/<nodeID> |
openpa/data |
Data from a [DataHandlers] handler. |
openpa/object/<objectID> |
openpa/object |
Object data. |
openpa/signup, openpa/activate/... |
openpa/signup |
User registration and activation. |
openpa/cookie |
openpa/cookie |
Cookie consent. |
robots.txt, sitemap.xml |
none | Generated robots.txt and an essential sitemap.xml. |
Template operators
openpaini, get_main_style, has_main_style, is_area_tematica, get_area_tematica_style,
is_dipendente, openpa_shorten, has_abstract, abstract, rss_list, materia_make_tree, access_style,
unique, find_first_parent, current_object_id, fix_dimension, object_state_list, solr_field,
solr_meta_field, solr_subfield, solr_meta_subfield, search_exclude_class_facets,
search_exclude_classes, search_query, strReplace, organigramma, trasparenza_root_node_id,
openpa_instance_identifier, openpa_recaptcha_public_key, top_menu_cached, left_menu_cached, tree_menu,
slugize, cookieset, cookieget, check_and_set_cookies, checkbrowser, is_deprecated_browser, sort,
rsort, asort, arsort, ksort, krsort, natsort, natcasesort, find_global_layout, query_string,
openpapagedata, fill_contacts_matrix, contacts_matrix_fields, parse_contacts_matrix, openpacontext,
object_handler, apps_root.
Examples:
{* a setting with a default, as the shipped page_head templates do *}
{if openpaini( 'Seo', 'GoogleTagManagerID', false() )}
...
{/if}
{* the services of a node or block *}
{def $openpa = object_handler( $node )}
{* strip tags and shorten a text to 120 characters *}
{$node.name|openpa_shorten( 120, '...' )}
{* a URL-safe slug *}
{'Amministrazione Trasparente'|slugize()}
Fetch functions
ruoli, homepage, nomi_ruoli_dirigenziali, dirigenti, footer_links, footer_notes, aree, servizi,
uffici, strutture, dipendenti, header_banner_background_style, header_logo_background_style,
calendario_eventi, faccette_classi_oggetti_correlati_inversi, list_count, list, tree, tree_count,
recaptcha_html, map_markers.
{def $nomi = fetch( 'openpa', 'nomi_ruoli_dirigenziali' )
$ruoli = fetch( 'openpa', 'ruoli' )}
{fetch( 'openpa', 'recaptcha_html' )}
Workflow events
Registered in settings/workflow.ini.append.php: event_updatesection, event_ezflowcustomblockupdate,
event_addcalendarbyevent, event_ezprotectsubsite, event_reindexrelations,
event_reindexonupdatepriority, event_updateuseropenparole, event_refreshopenpapagedata. Add them to a
workflow under Setup, Workflows, and attach it to a trigger.
Permissions
The openpa module defines these functions (modules/openpa/module.php): classdefinition, class,
manage_roles, data, calendar, editor_tools, object, signup, cookie, seo, recaptcha,
changestatesettings, changesectionsettings, theme. The apps module defines dashboard; the "Apps" tab
is shown to users with apps/dashboard.
site.ini.append.php puts the public views (openpa/classdefinition, calendar, object, data, signup,
cookie, loadwt, changestatedefinition, changesectiondefinition, robots.txt, sitemap.xml) in
[RoleSettings] PolicyOmitList[], so they need no policy.
Cron jobs and scripts
settings/cronjob.ini.append.php defines these parts (run with php runcronjobs.php <part>):
| Part | Scripts |
|---|---|
| default | change_section.php |
frequent |
clear_frontpages_cache.php, ezflowupdate.php, index_pending.php, update_class_pending.php |
clearfrontpages |
clear_frontpages_cache.php |
changesection |
change_section.php, change_state.php |
changestate |
change_state.php |
generatemenu |
generate_menu.php (runs bin/php/generatemenu.php for each related siteaccess) |
rename |
rename_object.php |
rss |
rssimport.php |
ezflowupdate.php and rssimport.php come from eZ Flow and the kernel; the others are in cronjobs/.
php runcronjobs.php changesection php runcronjobs.php frequent
change_state.php runs as the user admin. index_pending.php, update_class_pending.php and
rename_object.php need Solr as the search engine.
bin/php/ holds maintenance scripts (class checks and sync, cache clearing, re-indexing, migrations, instance
creation). bin/php/openpa.php runs one of them on every OpenPA instance:
php extension/openpa/bin/php/openpa.php help
php extension/openpa/bin/php/openpa.php check_class --class=folder --exclude=siteA,siteB
Upgrading
Update the package (composer update se7enxweb/openpa, or git pull in extension/openpa), then regenerate
the autoloads and clear the caches as in Installation. update/database/postgresql holds a
PostgreSQL fix (fix_integer_type.sql). See CHANGELOG.md for what changed.
Known limits
- The code was written for older PHP and kernel versions; this release changes only the admin tab icons and the release files, so test it on a copy of the site before going live.
- Class installation and
openpa/classcontact the prototype server named in[NetworkSettings] PrototypeUrl; without it they cannot fetch definitions. - Many settings and templates assume the OpenPA content classes (
apps_container,dipendente,servizio, ...). - This repository's
masterbranch is the 2.43 line; the 3.x line is on theversion3branch.
Troubleshooting
- The tabs have no icon: the icon appears only in designs that read
Icon=(admin4). Clear the INI cache (php bin/php/ezcache.php --clear-tag=ini). - Menus do not change after editing: clear the
openpacache tag (php bin/php/ezcache.php --clear-tag=openpa) or useopenpa/refreshmenu. - "The current search engine plugin is not eZSolr" from a cron job: that job needs Solr; remove it from the cron part on sites without Solr.
Contributing
Issues and pull requests are welcome at https://github.com/se7enxweb/openpa. The upstream project is https://github.com/OpencontentCoop/openpa.
License and credits
GNU General Public License v2.0, see doc/LICENSE. Bundled third-party code in lib/ keeps its own license
(listed in extension.xml).
OpenPA was designed, built and maintained by OpenContent (Opencontent SCARL, Trento, https://www.opencontent.it/) from 2010, originally for eZ Publish, the CMS that preceded Exponential. 7x maintains this copy for Exponential. The upstream README, with the full Italian notes on license, ethics and regulations, is in the upstream repository.
Sommario in italiano
OpenPA รจ la piattaforma di OpenContent per la comunicazione istituzionale e l'Open Government delle pubbliche
amministrazioni, qui distribuita per Exponential 6.x (PHP 8). Fornisce la sezione e la scheda "Amministrazione
Trasparente" (icona journal-text), la sezione e la scheda "Apps" (icona puzzle), l'organigramma, le
impostazioni SEO, cookie e reCAPTCHA, i cambi automatici di stato e di sezione per i contenuti scaduti,
robots.txt, sitemap.xml, operatori di template e funzioni fetch.
Installazione: composer require se7enxweb/openpa oppure copia in extension/openpa, poi
ActiveExtensions[]=openpa, php bin/php/ezpgenerateautoloads.php -e e
php bin/php/ezcache.php --clear-all. Le impostazioni si modificano con un override di openpa.ini.
Titolare della licenza e responsabile tecnico: Opencontent SCARL, https://www.opencontent.it/. Licenza GNU General Public License v2.0.