A page layout controls how a record’s detail page is arranged: which tabs appear and what widgets they contain. UseDocumentation Index
Fetch the complete documentation index at: https://docs.twenty.com/llms.txt
Use this file to discover all available pages before exploring further.
definePageLayout() to declare a layout for an object you own, or definePageLayoutTab() to add a single tab to a layout that already exists (yours or a standard Twenty one).
| Use case | Entitate |
|---|---|
| Define the entire layout for a record page on an object you own | definePageLayout |
| Add one tab to an existing layout (your own object, or a standard one) | definePageLayoutTab |
definePageLayout
Use this when you own the entire detail page — typically for a custom object you defined yourself.src/page-layouts/example-record-page-layout.ts
Puncte cheie
typeeste de obicei'RECORD_PAGE'pentru a personaliza vizualizarea de detaliu a unui obiect specific.objectUniversalIdentifierspecifică la ce obiect se aplică această machetă.- Fiecare
tabdefinește o secțiune a paginii cu untitle,positionșilayoutMode(CANVASpentru layout liber). - Each
widgetinside a tab can render a front component, a relation list, or other built-in widget types. positionpe file le controlează ordinea. Folosiți valori mai mari (de ex., 50) pentru a plasa filele personalizate după cele integrate.
definePageLayoutTab
Use this when you only want to add a tab to an existing layout — for example, an analytics tab on the standard Company page, or an AI summary tab attached to your own object’s layout.src/page-layouts/example-extra-tab.ts
Puncte cheie
pageLayoutUniversalIdentifieris required and must point to a page layout that already exists at install time — either a standard Twenty layout or one defined by your own app. Cross-app references to layouts owned by another installed app are not supported today. When the parent layout is missing, installation fails with a clear validation error.widgetsare scoped to this tab only — they reference front components, views, etc. exactly like widgets defined inline indefinePageLayout.positioncontrolează ordonarea în raport cu filele existente din layoutul țintă. Alege o valoare care să plaseze fila ta acolo unde dorești, relativ la filele predefinite.- Use this instead of
definePageLayoutwhen you only want to add to an existing layout. UsedefinePageLayoutwhen you own the entire layout.