> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Method name: items()

# Method package: w

# Method menu location: w --> Breadcrumbs --> items

# Method Link: https://dev.wix.com/docs/velo/velo-only-apis/$w/breadcrumbs/items.md

# Method Description:

Sets or gets breadcrumbs items.

Setting the `items` property sets the items
 for a breadcrumbs element.

 Set `items` to an empty array (`[]`) to remove all breadcrumbs items.

 Getting the `items` property returns breadcrumbs items that have been set using code. If no
 items have been set using code, your site generates a default items array based on your home page, the site visitor's location, 
 and the organization of your site's pages including 
 any [menu folders](https://support.wix.com/en/article/studio-editor-managing-dropdowns-in-a-menu#adding-items-to-a-dropdown-menu) you have added to your site. 

 Properties that don't have a value are omitted from the returned array.

 You can't modify the items array in-place. To add, change, or remove
 individual breadcrumbs items:

   1. Store the value of the `items` property in a variable.
   1. Make changes to the variable's array of items.
   1. Reset the `items` property with the variable's modified array.



# Method Code Examples:

*** Note: do not assume any prop names or enum values other than the ones in the example.

## Get breadcrumbs items

```javascript
// This example assumes the items were set
// using code.

let breadcrumbItems = $w('#myBreadcrumbs').items;
let firstIcon = breadcrumbItems[0].icon;

/* Sample array of breadcrumb items: 
 * [
 *   {
 *     'icon': 'wix:vector://v1/4c47c6_d6f8a5ad487c416399846a79a524196f.svg/',
 *     'link': '/home'
 *   },
 *   {
 *     'label': 'Venue',
 *     'link': '/zoo'
 *   },
 *   {
 *     'label': 'Animal',
 *     'link': '/lions'
 *   }
 * ]
 * 
 * In the 1st item, label is undefined. 
 * In the last 2 items, icon is undefined.
 */
```

## Set items for various kinds of breadcrumbs

```javascript
/*****************************
 * A basic breadcrumbs trail *
 *****************************/

// Note that the site's base URL 
// shouldn't be included in any
// item's link property.
$w('#myBreadcrumbs').items = [
  {'icon': 'wix:vector://v1/4c47c6_d6f8a5ad487c416399846a79a524196f.svg/', 'link': '/'},
  {'label': 'Venue', 'link': '/zoo'},
  {'label': 'Animal', 'link': '/lions', 'isCurrent': true}
];

/*******************************
 * A trail with multiple icons *
 *******************************/ 
$w('#myBreadcrumbs').items = [
  {'icon': 'wix:vector://v1/4c47c6_d6f8a5ad487c416399846a79a524196f.svg/', 'link': '/'},
  {'label': 'Venue', 'link': '/zoo'},
  { 'icon': '<svg width='50' height='50'><circle cx='25' cy='25' r='20' stroke='red' stroke-width='5' fill='blue'/></svg>', 
    'link': '/lions', 
    'isCurrent': true
  }
];

/*****************************************************
 * A trail with no links, for displaying the context *
 *****************************************************/
$w('#myBreadcrumbs').items = [
  {'icon': 'wix:vector://v1/4c47c6_d6f8a5ad487c416399846a79a524196f.svg/'},
  {'label': 'Zoo'},
  {'label': 'Tiger', 'isCurrent': true}
];
```

## Add a breadcrumbs item

```javascript
let crumbs = $w('#myBreadcrumbs').items;
crumbs.push({'label': 'My New Label', 'link': '/mynewlink'});
$w('#myBreadcrumbs').items = crumbs;
```

## Set breadcrumbs items for dynamic pages using Wix Location

```javascript
import wixData from 'wix-data';

$w.onReady(function () {
  $w('#tourismDynamicDataset').onReady(() => {
    wixData.query('tourism')
      .eq('country', 'Italy')
      .find()
      .then((results) => {
        let firstPlaceToSee = results.items[0]
        $w('#customBreadcrumbs').items = [
          { 
            icon: 'wix:vector://v1/4c47c6_d6f8a5ad487c416399846a79a524196f.svg/', 
            link: '/' 
          },
          { 
            label: 'Places to See', 
            link: '/' + firstPlaceToSee['link-tourism-all'] 
          },
          { 
            label: firstPlaceToSee.title, 
            link: '/' + firstPlaceToSee['link-tourism-title'] 
          }
        ]
      });
  })
});
```

---