# Collection websites

Example website navbar for a collection website page. All hotels share the same detail page, the same templates for rooms, etc

<pre><code>Group homepage
├─ Group contact page
├─ Special offers (list of offers at group level)
<strong>├─ Hotel Detail Page
</strong>│  ├─ Rooms List (for hotel)
│  │  ├─ Room detail page
│  ├─ Restaurants list (for hotel)
│  │  ├─ Restaurant detail page
│  ├─ Contact page (for hotel)
</code></pre>

### Accessing the hotel in context&#x20;

While building a collection website, sometimes you will want to show the hotel name in the header for all pages of the hotel.

```
├─ Hotel Detail Page
│  ├─ Rooms List (for hotel)
│  │  ├─ Room detail page
│  ├─ Restaurants list (for hotel)
│  │  ├─ Restaurant detail page
│  ├─ Contact page (for hotel)

```

You could do `{{item.name}}` , but this would show the name of the item in context

-> on a hotel detail page you would have the correct name

-> but on a room detail page, it will show the name of room, instead of the name of the hotel

To access the hotel in context (only for Collection website), you can use `{{item-hotel.XX}}`

This `if` will be displayed only if you are on a hotel detail page, or children's pages of the hotel

<pre><code>{if=" '{{item-hotel.id}}' "}
<strong>    {{item-hotel.name}}
</strong>    {{item-hotel.short_description}}
    etc...
{/if}
</code></pre>
