# Template

The template object contains information about the currently active template.

The `template` object contains information about the currently active template.

Outputting the `template` object itself returns the file name of the template used to render the current page, without the `.liquid` or `.json` extension.

```liquid
<!-- On the product.alternate.json template -->
{{ template }}
```

```text
product.alternate
```

The `template` object has the following attributes:

## template.directory

Returns the name of the template's parent directory. Returns `nil` for templates whose parent directory is the `/templates` folder.

```liquid
<!-- On the customers/login.liquid template -->
{{ template.directory }}
```

```text
customers
```

## template.name

Returns the name of the template's base type.

```liquid
<!-- On the product.alternate.json template -->
{{ template.name }}
```

```text
product
```

## template.suffix

Returns the custom name of an alternate template. Returns `nil` if no alternate template is used.

```liquid
<!-- On the product.alternate.json template -->
{{ template.suffix }}
```

```text
alternate
```


## More properties

VersaCommerce also provides these properties on the `template` object:

| Properties | Returns |
|---|---|
| `include?` | Whether the template name contains the supplied string |
