> For the complete documentation index, see [llms.txt](https://docs.themeupstudio.com/travio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.themeupstudio.com/travio/rename-taxonomies/developer-reference.md).

# Developer Reference

## Developer Reference

{% hint style="info" %}
This page is not required for normal theme setup.
{% endhint %}

Use it only if you are a developer, or if support asks you to check every place where Destinations and Experiences are used in the theme code.

### What normal users should do

For a normal rename, keep these internal names unchanged:

* `destinations`
* `experiences`
* `destination`
* `experience`
* `[destinations]`
* `[experiences]`

Change only the visible text and public URLs described in the earlier pages.

### Why this page exists

Travio's JavaScript looks for specific data attributes and class names. If one is renamed in a template but not renamed in JavaScript, features can stop working.

Examples:

```txt
data-destination-page
.js-load-destinations
data-experience-page
.js-load-experiences
data-filter-section="destination"
data-filter-section="experience"
```

Do not change these unless you also update every matching selector.

### Destination index references

Main template:

```txt
destinations.hbs
```

Matching frontend behavior:

```txt
assets/js/scripts.js
```

Selectors and attributes used by the destination index:

```txt
data-destination-page
data-destination-slugs
.js-destination-list
.js-destination-pagination-container
.js-load-destinations
data-no-destinations-text
data-destination-card
data-destination-slug
```

JavaScript names to search for:

```txt
handleDestinationLoadMore
renderDestinationCard
fetchDestinationPage
[data-destination-page]
.js-destination-list
.js-load-destinations
.js-destination-pagination-container
[data-destination-slug]
```

If you rename `data-destination-page` to something like `data-place-page`, every matching selector must be changed too.

### Experience index references

Main template:

```txt
experiences.hbs
```

Matching frontend behavior:

```txt
assets/js/scripts.js
```

Selectors and attributes used by the experience index:

```txt
data-experience-page
data-experience-slugs
.js-experience-list
.js-experience-pagination-container
.js-load-experiences
data-no-experiences-text
data-experience-card
data-experience-slug
```

JavaScript names to search for:

```txt
handleExperienceLoadMore
renderExperienceCard
fetchExperiencePage
[data-experience-page]
.js-experience-list
.js-load-experiences
.js-experience-pagination-container
[data-experience-slug]
```

### Filter identifiers

Travio uses these filter identifiers:

```txt
destination
experience
tagDestination
tagExperience
tag-destination
tag-experience
```

They appear in:

* `index.hbs`
* `archive.hbs`
* `videos.hbs`
* `author.hbs`
* `tag.hbs`
* `partials/tag/layout-default.hbs`
* `partials/tag/layout-custom.hbs`
* `partials/scripts.hbs`
* `assets/js/scripts.js`

They also affect Code Injection filter settings.

Example:

```js
window.TRAVIO_CONFIG = {
  filters: {
    visibility: {
      articles: ["destination", "experience"],
      archive: ["destination", "experience", "date"],
      tagDestination: ["destination", "experience"],
      tagExperience: ["destination", "experience"]
    }
  }
};
```

Leave these filter identifiers unchanged unless you are prepared to update Code Injection examples and all related JavaScript.

### Header dropdown and special nav token references

Travio recognizes these Primary Navigation tokens:

```txt
[destinations]
[experiences]
```

The token parser is in:

```txt
partials/navigation.hbs
```

Important identifiers:

```js
normalizedSpecialToken === "[destinations]"
normalizedSpecialToken === "[experiences]"
specialNavTokens.destinations
specialNavTokens.experiences
data-primary-nav-special-destinations
data-primary-nav-special-experiences
```

Header controls are in:

```txt
partials/header.hbs
```

Important identifiers:

```hbs
data-primary-nav-special="destinations"
data-primary-nav-special="experiences"
data-primary-nav-order-token="destinations"
data-primary-nav-order-token="experiences"
data-country-group="destinations"
data-country-group="experiences"
```

If you rename `[destinations]` to `[places]`, update both `partials/navigation.hbs` and `partials/header.hbs`, then update the public documentation and warning messages.

For most sites, keep `[destinations]` and `[experiences]` unchanged.

### Header dropdown shared country naming

The header dropdown code uses internal names such as:

```txt
data-country-dropdown
data-country-option
data-country-name
data-country-slug
country-dropdown
country-name
```

These are not visitor-facing labels. You can leave them unchanged even when the public names change.

### Icon assets

Current header icons:

```txt
assets/images/globe-destination.svg
assets/images/globe-experience.svg
```

References are in:

```txt
partials/header.hbs
```

If your new names need different icons, replace these SVG files or update the asset paths in `partials/header.hbs`.

### Build after JavaScript edits

If you edit JavaScript source files, rebuild the theme before uploading it.

Source files:

```txt
assets/js/index.js
assets/js/scripts.js
```

Generated output:

```txt
assets/built/
```

Do not manually edit `assets/built/index.js`. Edit the source files and run:

```bash
npm run build
```

Then upload the rebuilt theme.
