> For the complete documentation index, see [llms.txt](https://help.pixfizz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.pixfizz.com/ecommerce/shopify-+-pixfizz/add-account-navigation.md).

# Add Account Navigation

This guide adds two navigation features for logged-in customers:

1. **Account dropdown** — the account icon in the header opens a dropdown menu with links to My Projects, My Galleries, Account, and Log out.
2. **Tab navigation** — a shared tab bar that appears at the top of the My Projects and My Galleries pages, letting customers switch between them.

Both features are optional and can be set up independently.

***

#### Prerequisites

Before starting, make sure you have:

* The Pixfizz Shopify integration installed and working on your store
* At least one of the following pages set up:
  * My Projects (Card Grid)
  * My Galleries

***

### Part 1: Account dropdown menu

This converts the account icon in the header from a plain link into a dropdown for logged-in customers. Logged-out visitors still see the icon as a link to the login page.

#### Step 1: Edit the header section

In your Shopify admin, go to **Online Store → Themes**, click the three-dot menu on your active theme, and select **Edit code**.

Open `sections/header.liquid`.

Find the account icon block. In the Dawn theme, it looks like this:

```liquid
{%- if shop.customer_accounts_enabled -%}
  <a href="{%- if customer -%}{{ routes.account_url }}{%- else -%}{{ routes.account_login_url }}{%- endif -%}" class="header__icon header__icon--account link focus-inset{% if section.settings.menu != blank %} small-hide{% endif %}">
    <account-icon>
      {%- if customer and customer.has_avatar? -%}
        {{ customer | avatar }}
      {%- else -%}
        {% render 'icon-account' %}
      {%- endif -%}
    </account-icon>
    <span class="visually-hidden">
      {%- liquid
        if customer
          echo 'customer.account_fallback' | t
        else
          echo 'customer.log_in' | t
        endif
      -%}
    </span>
  </a>
{%- endif -%}
```

Replace the entire block with the following:

```liquid
{%- if shop.customer_accounts_enabled -%}
  {%- if customer -%}
    <details-disclosure>
      <details class="header__icon header__icon--account pxn-account-dropdown">
        <summary class="link focus-inset" aria-label="{{ 'customer.account_fallback' | t }}">
          <account-icon>
            {%- if customer.has_avatar? -%}
              {{ customer | avatar }}
            {%- else -%}
              {% render 'icon-account' %}
            {%- endif -%}
          </account-icon>
        </summary>
        <div class="pxn-account-menu">
          <a href="/pages/my-projects" class="pxn-account-menu__item">My Projects</a>
          <a href="/pages/my-galleries" class="pxn-account-menu__item">My Galleries</a>
          <hr class="pxn-account-menu__divider">
          <a href="{{ routes.account_url }}" class="pxn-account-menu__item">Account</a>
          <a href="{{ routes.account_logout_url }}" class="pxn-account-menu__item">Log out</a>
        </div>
      </details>
    </details-disclosure>
  {%- else -%}
    <a href="{{ routes.account_login_url }}" class="header__icon header__icon--account link focus-inset{% if section.settings.menu != blank %} small-hide{% endif %}">
      <account-icon>
        {% render 'icon-account' %}
      </account-icon>
      <span class="visually-hidden">{{ 'customer.log_in' | t }}</span>
    </a>
  {%- endif -%}
{%- endif -%}
```

#### Step 2: Add the dropdown CSS

In the same `sections/header.liquid` file, find the `<style>` block near the top of the file. Add the following CSS at the end, just before the closing `</style>` tag:

```css
  /* ---- Account dropdown ---- */

  .pxn-account-dropdown {
    position: relative;
    cursor: pointer;
  }

  .pxn-account-dropdown summary {
    display: flex;
    align-items: center;
    list-style: none;
  }

  .pxn-account-dropdown summary::-webkit-details-marker {
    display: none;
  }

  .pxn-account-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    min-width: 180px;
    padding: 0.5rem 0;
    z-index: 100;
  }

  .pxn-account-menu__item {
    display: block;
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
    color: #333;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
  }

  .pxn-account-menu__item:hover {
    background: #f5f5f5;
    color: #000;
  }

  .pxn-account-menu__divider {
    margin: 0.35rem 0;
    border: none;
    border-top: 1px solid rgba(0,0,0,0.06);
  }
```

Save the file.

#### Customising the dropdown links

You can add, remove, or reorder links in the dropdown by editing the `<a>` tags inside the `.pxn-account-menu` div. For example, to add an Orders link:

```html
<a href="/pages/my-projects" class="pxn-account-menu__item">My Projects</a>
<a href="/pages/my-galleries" class="pxn-account-menu__item">My Galleries</a>
<hr class="pxn-account-menu__divider">
<a href="{{ routes.account_url }}" class="pxn-account-menu__item">Orders</a>
<a href="{{ routes.account_url }}" class="pxn-account-menu__item">Account</a>
<a href="{{ routes.account_logout_url }}" class="pxn-account-menu__item">Log out</a>
```

***

### Part 2: Tab navigation

This adds a tab-style navigation bar that appears at the top of the My Projects and My Galleries pages, letting customers switch between them.

#### Step 1: Create the snippet

In the **Snippets** folder, click **Add a new snippet**. Name it `pixfizz-account-nav.liquid`.

Paste the following code:

```liquid
<style>
  #pxn-account-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
    box-sizing: border-box;
  }

  #pxn-account-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }

  #pxn-account-nav a {
    display: block;
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: #717171;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
  }

  #pxn-account-nav a:hover {
    color: #000;
  }

  #pxn-account-nav a.is-active {
    color: #000;
    font-weight: 600;
    border-bottom-color: #000;
  }
</style>

<nav id="pxn-account-nav">
  <ul>
    <li>
      <a href="/pages/my-projects"
        class="{% if request.path contains 'my-projects' %}is-active{% endif %}">
        My Projects
      </a>
    </li>
    <li>
      <a href="/pages/my-galleries"
        class="{% if request.path contains 'my-galleries' %}is-active{% endif %}">
        My Galleries
      </a>
    </li>
  </ul>
</nav>
```

Save the file.

#### Step 2: Add the nav to page templates

Open each page template and add the nav render at the top.

**`templates/page.pixfizz-projects.liquid`** should contain:

```liquid
{% render 'pixfizz-account-nav' %}
{% render 'pixfizz-projects' %}
```

**`templates/page.pixfizz-galleries.liquid`** should contain:

```liquid
{% render 'pixfizz-account-nav' %}
{% render 'pixfizz-galleries' %}
```

Save both files.

#### Customising the tabs

To add more tabs, add another `<li>` inside the `<ul>` in `pixfizz-account-nav.liquid`. For example:

```liquid
<li>
  <a href="/account"
    class="{% if request.path == '/account' %}is-active{% endif %}">
    Account
  </a>
</li>
```

***

#### File summary

After completing this guide, your theme will contain the following files:

| File                                      | Purpose                                                        |
| ----------------------------------------- | -------------------------------------------------------------- |
| `sections/header.liquid`                  | Modified — account icon shows dropdown for logged-in customers |
| `snippets/pixfizz-account-nav.liquid`     | Shared tab navigation bar                                      |
| `templates/page.pixfizz-projects.liquid`  | Wrapper — renders nav + projects snippet                       |
| `templates/page.pixfizz-galleries.liquid` | Wrapper — renders nav + galleries snippet                      |

***

#### Notes

* The account dropdown uses Dawn's built-in `<details-disclosure>` web component, which automatically closes the dropdown when the customer clicks outside it. If your theme does not include this component, the dropdown will still work but will need to be closed by clicking the icon again.
* The tab navigation highlights the active page using Shopify's `request.path` variable. The URL handles must match the page handles you created (`my-projects` and `my-galleries`). If you used different page titles, adjust the `contains` checks accordingly.
* Both features are styled to match the Dawn theme. On other themes, you may need to adjust colours, font sizes, or spacing.
