Pages and routing
A page is a menu entry: a record of BSPK_WEB_DOMAIN_MENU, itself attached to a BSPK_WEB_DOMAIN. Blocks point at it through webDomainMenuUuid.
The fields that decide whether a URL answers
The page table has 25 fields. These are the ones that matter when a page does not respond:
| Field | Effect |
|---|---|
publish | False gives a 404. Not a hidden page: a missing one |
publishStart / publishEnd | Time-boxing, enforced on the page itself |
urlParts | The URL segments |
useName / useNameAsPrefix | Whether the name takes part in building the URL |
autoUpdate | Whether the URL is regenerated when the name changes |
displayInMenu | Menu only. Has no effect on whether the URL answers |
isHomepage | The domain's entry point |
tableName | The table a detail page binds to |
userRightUuid / editRightUuid | Who may view, who may edit |
Trap:
displayInMenuand the visibility rules drive the MENU, not the service. A page absent from the menu is still served to anyone with its URL. To actually close it, use the rights or unpublish it.
Creating a page through the API
Two failures, both frequent:
publish: trueis mandatory, otherwise every request returns a 404. Once published, the route answers without needing a restart.urlParts,useNameandautoUpdatemust be consistent. A page created without them has no usable URL and returns a 404 even though the record exists.
Regenerating a URL is a silent no-op when autoUpdate is false: the name changes, the URL does not, and nothing says so.
Dynamic pages
A page bound to a table takes the record's key in the URL. Two rules:
?pk=is reserved by the router. Never use that parameter name for your own purposes.- In 4D, the key of the current record arrives as
$vo_POST.pk.
The breadcrumb label follows a cascade: the expression (pageLabelExpression), then a URL parameter, then the page name.
Multilingual pages
languageOptions and the alternate-page link carry the equivalence between language versions. A language equivalence redirects with a 301, not a 302: the move is permanent, and search engines should forget the old URL.
Domain-level switches
BSPK_WEB_DOMAIN decides what the pages get: templateType (which page shell: tpl-page1, tpl-page2…), useSpa, useWebSocket, useWebApp, analytics tags, and loginPageUuid.
Admin screens
The /bweb/* screens follow the same model but are rendered from stored templates. Two things that bite:
- access is by an
ADMIN_<SLUG>right, not a hard-codedDEVcode; - the standard
modalblock does not work there (see Modal).
See also
- The request lifecycle: the order in which all of this is evaluated
- Security: rights re-checked on every POST

