The Craft 6 beta is out. Learn what's new and how Craft 6 works on Laravel. Explore Craft 6

Craft 6: Field Layout Sidebar Tabs

Craft 6 can render field layout tabs in the element editor's sidebar, next to the default Info, Activity, and Versions panes. In this lesson we create a new MLS Data sidebar tab on a real estate site's Property entry type, give it an icon, move the price, listing status, and MLS number fields into it, and see how it looks and works when editing an entry. It's a good fit for synced or secondary data that belongs to the entry but doesn't need a place in the main layout.

One of the qui­eter fea­tures in Craft 6 lets you take a field lay­out tab and ren­der it as a pan­el in the ele­ment editor’s side­bar. That’s the same side­bar that holds the Info, Activ­i­ty, and Ver­sions panes.

In this video, I cover:

  • Where side­bar tabs live in the field lay­out designer
  • Mov­ing an exist­ing tab to the side­bar and back
  • Cre­at­ing a new side­bar tab with a cus­tom icon
  • Adding new and exist­ing fields to a side­bar tab
  • How side­bar tab fields look and save when edit­ing an entry

Why put a tab in the side­bar? You might have data that’s synced from anoth­er sys­tem, like MLS list­ing data. It needs to be part of the entry, but it doesn’t need a place in the main lay­out. Or the con­tent is sec­ondary and you’d rather tuck it out of the way.

In the field lay­out design­er for the Prop­er­ty entry type, the Con­tent tab now has a Side­bar Tabs area to the right. You can move any exist­ing tab there with ​“Move to side­bar”, or cre­ate a new one. We cre­ate an MLS Data tab, swap its default let­ter icon for a house icon, and note the user and entry vis­i­bil­i­ty con­di­tions that can lim­it who sees it. Then we add an MLS Num­ber field and drag in the exist­ing Price and List­ing Sta­tus fields.

On a prop­er­ty entry, the reg­u­lar tabs stay where they are, and MLS Data shows up as a pan­el in the side­bar. The fields in it are stan­dard entry fields. They’re editable and save exact­ly like the fields in the main lay­out. They just sit some­where else.

Find all of the Craft 6 videos at craftquest.io/craft‑6.

Transcript

Premium

Follow along with the full transcript

Search every word, click any line to jump to that moment, and read along as you watch. A CraftQuest Premium feature.

Sign up for Premium