# How to display different layouts for the same kanban card

Kanban can display different layout tabs for the same card depending on what cell has been clicked by user.

* Create kanban variable that will toggle layout types:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FEHt2GabA7vky1MEYlMic%2Ffile.excalidraw.svg?alt=media&#x26;token=dbdd0786-d68d-4ddc-bbed-bc29f6275567" alt="" class="gitbook-drawing">

* In Card Layout settings  set 'Layout Body' to Standard (Body Configuration tab):

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FId6OBGBWX9aszqMIDxfl%2Ffile.excalidraw.svg?alt=media&#x26;token=9f12da74-3d51-48dd-9aa5-4b2ca5950687" alt="" class="gitbook-drawing">

* Go to "Tabs Configuration" and create 2 Layout tabs.
* Set conditions to display each tab using variable you created:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FVtFf4UrCLijECQIXtwOU%2Ffile.excalidraw.svg?alt=media&#x26;token=8f9936fa-5dd5-403c-9ccf-0a8cc045bf72" alt="" class="gitbook-drawing">

* On the Card Compact layout choose cell that will handle mouse click ("onClick" event) to display specified layout tab:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FJbNOcNbFFwZOpf2RsoV8%2Ffile.excalidraw.svg?alt=media&#x26;token=6a988d4a-ad57-4a08-9099-a85e6748daef" alt="" class="gitbook-drawing">

* Add handlers for "Account Name" cell:

1. "Update Variables" handler sets "2" value to "layoutType" variable, which means that click on Account Name will load layout's "Tab 2" tab (based on layout tabs conditions)
2. "Refresh Card Layout" handler:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FrjEvXiuayqnqSdPYbm2n%2Ffile.excalidraw.svg?alt=media&#x26;token=5ea3ca04-b018-4d56-a5c7-c8606bd356f5" alt="" class="gitbook-drawing">

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FFjGleHvzHl0xT5BtYMRy%2Ffile.excalidraw.svg?alt=media&#x26;token=6f0fb702-0b31-40e9-83de-88c9f847074c" alt="" class="gitbook-drawing">

* Save Kanban.

Based on the setup above card layout types will switch from 'Tab 1' to 'Tab 2' tab each displaying separate KanBan Form based on what cell user clicks.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flexikanban.ai/standard-kanban/howtos-and-best-practices/how-to-display-different-layouts-for-the-same-kanban-card.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
