Skip to content

System settings

Fifty-one settings in the pageblocks namespace, all created by the package installer. The defaults below are what a fresh installation gets.

A missing setting is not the same as its default

MODX returns an empty value for a setting that does not exist, and the code usually reads that as "off". If a feature seems inert, check that the key is actually in System → System settings before changing anything — on a site where the package was delivered by copying files rather than installing, the settings never appeared at all.

Main

SettingDefaultDescription
pageblocks_routingfullRouting mode: Disabled (off), Route Only (routes), Full API (full).
pageblocks_strict_routesoffMatch routes strictly, without lenient fallbacks.
pageblocks_route_cacheoffCache the compiled route table. Cleared with the MODX cache.
pageblocks_site_modeprodProduction or Development. See Mail — in dev it stops mail from reaching real users.
pageblocks_versioningonKeep a version history of objects, so changes can be rolled back.
pageblocks_moderationoffThe moderation queue: a badge in the top menu, a dashboard widget, and a "Moderation" checkbox in the table constructor.
pageblocks_hide_templatesTemplate ids where the PageBlocks tab is hidden.
pageblocks_hide_parentsParent resource ids where the tab is hidden.
pageblocks_hide_resourcesResource ids where the tab is hidden.
pageblocks_hide_usersUser ids for whom the tab is hidden.
pageblocks_hide_user_groupsUser groups for whom the tab is hidden.

A missing pageblocks_routing is not off

The installer sets full. But when the key is absent entirely, the component reads that as routes: routes work, the full API does not. Routing is only disabled by an explicit off.

Moderation changes your tables

The setting moderates nothing by itself — it reveals the "Moderation" checkbox in the table constructor. A table with that box ticked gets a moderation_at column when saved, and the queue picks rows by that column. Turn the setting off and nothing is queued, and new tables get no column.

It is off by default on purpose: on a site where everything is published straight away, moderation only adds a menu item, a widget and a counter query on every manager page — for a queue that is always empty.

Parser

SettingDefaultDescription
pageblocks_elements_path{core_path}App/elements/Where file chunks and templates live.
pageblocks_fenom_auto_reloadonRecompile a template when its source changes. Turn it off on a busy production site — but remember to clear the cache after every template change.
pageblocks_file_elements_onlyoffResolve templates from files only, ignoring MODX chunks.

JavaScript

Class names the front-end scripts put on elements. They default to Bootstrap 5; change them to match your CSS framework rather than fighting it.

SettingDefaultDescription
pageblocks_load_scriptsonLoad the component's scripts on the front end.
pageblocks_hidden_classd-noneClass that hides an element.
pageblocks_field_erroris-invalidClass added to a field that failed validation.
pageblocks_field_msg_errorinvalid-feedbackClass of the error text under such a field.
pageblocks_msg_errortext-error,text-dangerClasses of an error message.
pageblocks_msg_successtext-successClasses of a success message.

Images

Applied when an image goes through the component's image pipeline.

SettingDefaultDescription
pageblocks_image_formatwebpOutput format.
pageblocks_image_quality82Compression quality.
pageblocks_image_max_width0Downscale to this width. 0 means no limit.

Cache

SettingDefaultDescription
pageblocks_http_cacheoffCache whole responses.
pageblocks_http_cache_ttl3600Lifetime in seconds.

Mail

SettingDefaultDescription
pageblocks_admin_emailAddress that still receives mail while the site is in dev mode.
pageblocks_dev_mail_groupsAdministratorUser groups that still receive mail in dev mode.

This pair is a safety catch, not a preference

With pageblocks_site_mode = dev, mail only goes to pageblocks_admin_email and to the listed groups; everything else is dropped and the fact is written to the MODX log.

It matters most on a copy of a production database. A staging site restored from a dump inherits prod from that dump, the catch is off, and one cron run mails every user in the table. After restoring a dump, set the mode back to dev before anything else.

API

CORS for the REST API. Off while pageblocks_cors_origins is empty.

SettingDefaultDescription
pageblocks_cors_originsAllowed origins. Empty means CORS is off.
pageblocks_cors_pathsapi/*Paths the headers apply to.
pageblocks_cors_methodsGET,POST,PUT,PATCH,DELETE,OPTIONSAllowed methods.
pageblocks_cors_headersAuthorization,Content-Type,X-Requested-With,X-API-KeyAllowed request headers.
pageblocks_cors_expose_headersResponse headers exposed to the browser.
pageblocks_cors_credentialsoffAllow credentials.
pageblocks_cors_max_age86400Preflight cache lifetime, in seconds.

Blocks

SettingDefaultDescription
pageblocks_block_groupsGroups blocks are sorted into in the constructor.

Security

Headers the component adds to the response. In full: Security headers.

SettingDefaultDescription
pageblocks_security_headersonSend security headers at all. Turning it off disables every header below, filled in or not.
pageblocks_security_frame_optionsSAMEORIGINX-Frame-Options: who may open the site in a frame. DENY means nobody.
pageblocks_security_referrer_policystrict-origin-when-cross-originReferrer-Policy: how much of the address another site sees on a click-through.
pageblocks_security_permissions_policyPermissions-Policy: which browser features are denied. Empty means do not send — denying geolocation breaks maps.
pageblocks_security_hsts0Strict-Transport-Security, in seconds. 0 is off. Sent over https only.
pageblocks_security_cspContent-Security-Policy: where the page may load scripts, styles and images from.

An empty value means "do not send this header". The three that are filled in work right after installation because they break nothing; the three empty ones need a deliberate decision.

HSTS and CSP can take a working site down

Browsers remember HSTS for a long time and will not fall back to http — enable it only once https works across the whole site. CSP breaks inline scripts and third-party widgets. Tune both on a copy, not in production.

Maps

The provider for the Map field is chosen once per site.

SettingDefaultDescription
pageblocks_map_typeleafletleaflet — OpenStreetMap, works without a key. ymaps — Yandex Maps.
pageblocks_yandex_apikeyThe key for ymaps, from the Yandex developer dashboard. Without it the map stays blank.

ReCAPTCHA

Keys for the recaptcha middleware — see Middleware.

SettingDefaultDescription
pageblocks_recaptcha_serviceGoogle reCAPTCHAThe anti-spam service in use.
pageblocks_recaptcha_public_keySite key, rendered into the front-end form.
pageblocks_recaptcha_secret_keySecret key, used to verify the token on the server.

The settings switch nothing on by themselves: an empty secret key is what the middleware reads as "verification off", and the request passes through.

License

There is one field to fill in here. The component maintains the rest — see Editions.

SettingDefaultDescription
pageblocks_license_api_keyThe key from your purchase email. Paste it and the component takes a licence for the current domain — you do not name the domain when buying.
pageblocks_license_keyFilled in for you: the issued licence key, PB1.xxx.yyy.
pageblocks_license_serverhttps://boshnik.com/…Where licences are issued. Change it only if asked to.
pageblocks_license_tryInternal, filled in automatically.
pageblocks_license_stateInternal, filled in automatically.

Translation is not here

API keys, models and prompts for machine translation are not system settings. Each translator is a row with its own key and model — see Translators.

© PageBlocks 2019-present