import{r as n,p as c,q as u,w as l,z as e,t as i,R as t}from"./vendor.8ed37afc.js";const d={class:"markdown-body"},h=t("Presets store the state of a Collection Detail page. They can be used to set layout defaults or define bookmarks to specific datasets. "),p=t("Learn more about Presets"),_=t("."),f=e("h2",{id:"creating-a-preset"},[t("Creating a Preset "),e("a",{class:"header-anchor",href:"#creating-a-preset"},"#")],-1),g=e("ol",null,[e("li",null,[t("Navigate to "),e("strong",null,"Settings > Presets & Bookmarks")]),e("li",null,[t("Click the "),e("strong",null,"Create Preset"),t(" action button in the header")]),e("li",null,[t("Complete the "),e("strong",null,"other preset form fields"),t(" outlined below")])],-1),m=e("ul",null,[e("li",null,[e("strong",null,"Collection"),t(" \u2014 The collection of this preset; supports any project collection, Directus Files, or Directus Users")]),e("li",null,[e("strong",null,"Scope"),t(" \u2014 The users that will have access to this preset, either Global, a specific Role, or an individual User")]),e("li",null,[e("strong",null,"Layout"),t(" \u2014 The collection detail\u2019s layout this preset applies to")]),e("li",null,[e("strong",null,"Name"),t(" \u2014 If left blank, this preset will act as a Default for the collection/layout; if given a name, it will be shown as a bookmark")])],-1),v=e("p",null,[t("After you have completed the form, the layout preview will be populated with live data. "),e("strong",null,"You can now tailor the layout as desired by updating the preview or the filter component in the page sidebar.")],-1),y=e("p",null,"Each preset saves all of the information needed to recreate a view of the collection/layout, including:",-1),b=e("ul",null,[e("li",null,[e("strong",null,"Collection"),t(" \u2014 The collection of the preset")]),e("li",null,[e("strong",null,"Layout"),t(" \u2014 The Layout the preset applies to")]),e("li",null,[e("strong",null,"Layout Query"),t(" \u2014 Order direction, order field, pagination, etc")]),e("li",null,[e("strong",null,"Layout Options"),t(" \u2014 The configuration of all layout options")]),e("li",null,[e("strong",null,"Search"),t(" \u2014 Any full-text search query applied")]),e("li",null,[e("strong",null,"Filters"),t(" \u2014 Any advanced filters applied")]),e("li",null,[e("strong",null,"User"),t(" \u2014 Optional; scopes to a specific user")]),e("li",null,[e("strong",null,"Role"),t(" \u2014 Optional; scopes to a specific role")]),e("li",null,[e("strong",null,"Bookmark Name"),t(" \u2014 Optional; determines if the preset is a bookmark")])],-1),k={class:"tip hint"},w=e("div",{class:"hint-title"},"Defaults vs Bookmarks",-1),D=t("It\u2019s important to be aware of the difference between a collection\u2019s "),C=e("em",null,"defaults",-1),P=t(" and its "),T=e("em",null,"bookmarks",-1),B=t(", both of which are configured by presets. A "),N=e("em",null,"default",-1),x=t(" is how a user will initially view the collection detail without any further customization, while a "),L=e("em",null,"bookmark",-1),O=t(" is a named dataset that can be recalled at any point via the "),A=t("navigation bar"),S=t("."),U=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"System Defaults"),e("p",null,"You can also adjust the defaults and bookmarks for the Directus Activity, Directus Files, and Directus Users collections.")],-1),I=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Order of Defaults"),e("p",null,"Multiple defaults can be configured for a user, either for different layouts of even the same layout. In this case, the preset priority is: User, then Role, then Global.")],-1),R=e("h2",{id:"deleting-a-preset"},[t("Deleting a Preset "),e("a",{class:"header-anchor",href:"#deleting-a-preset"},"#")],-1),j=e("ol",null,[e("li",null,[t("Navigate to "),e("strong",null,"Settings > Presets & Bookmarks > [Preset]")]),e("li",null,[t("Click the red "),e("strong",null,"Delete Preset"),t(" action button in the header")]),e("li",null,[t("Confirm this decision by clicking "),e("strong",null,"Delete"),t(" in the dialog")])],-1),q=e("div",{class:"danger hint"},[e("div",{class:"hint-title"},"Irreversible Change"),e("p",null,"This action is permanent and can not be undone. Please proceed with caution.")],-1),G={setup(F,{expose:a}){const o={title:"Collection Presets",modularExtension:!1};return a({frontmatter:o}),(V,z)=>{const s=n("router-link"),r=n("DocsWrapper");return c(),u(r,{frontmatter:o},{default:l(()=>[e("div",d,[e("blockquote",null,[e("p",null,[h,i(s,{to:"/docs/getting-started/glossary/#presets"},{default:l(()=>[p]),_:1}),_])]),f,g,m,v,y,b,e("div",k,[w,e("p",null,[D,C,P,T,B,N,x,L,O,i(s,{to:"/docs/app/overview/#_2-navigation-bar"},{default:l(()=>[A]),_:1}),S])]),U,I,R,j,q])]),_:1})}}};export{G as default};
