|
1
|
export const metadata = { |
|
2
|
title: `Layout Configurations`, |
|
3
|
} |
|
4
|
|
|
5
|
# {metadata.title} |
|
6
|
|
|
7
|
In this guide, you'll learn about layout configurations in the Settings Module. |
|
8
|
|
|
9
|
<Note title="Tip"> |
|
10
|
|
|
11
|
Refer to the [Medusa Admin User Guide](!user-guide!/tips/layout-configurations) to learn how to customize layouts in the Medusa Admin dashboard. |
|
12
|
|
|
13
|
</Note> |
|
14
|
|
|
15
|
## What is a Layout Configuration? |
|
16
|
|
|
17
|
A layout configuration stores the layout preferences of a zone in the dashboard, such as a product's details page or the sidebar. It lets admin users customize the order and visibility of a zone's sections. |
|
18
|
|
|
19
|
The [LayoutConfiguration](/references/settings/models/LayoutConfiguration) data model stores a layout's customizations in its `configuration` property, and it's associated with a zone through its `zone` property. |
|
20
|
|
|
21
|
--- |
|
22
|
|
|
23
|
## Layout Configuration Types |
|
24
|
|
|
25
|
There are two types of layout configurations for a zone: |
|
26
|
|
|
27
|
1. System default: A stored layout configuration that has its `is_system_default` property enabled and no `user_id`. It applies to all users that don't have a personal layout. Only one system default can exist per zone. |
|
28
|
2. Personal layout: A stored layout configuration that has a `user_id`. It's private to the user that created it. |
|
29
|
|
|
30
|
--- |
|
31
|
|
|
32
|
## Active Layout Scope |
|
33
|
|
|
34
|
Each user has an active layout scope for a zone, which is either `personal` or `default`. It indicates whether the user is viewing their personal layout or the system default. |
|
35
|
|
|
36
|
The `getActiveLayoutScope` method of the module's service retrieves a user's active scope for a zone, and the `setActiveLayoutScope` method sets it. |