# Room

A room is always linked to an hotel. By default, when you loop on rooms, they will be sorted using the drag'n'drop order inside the hotel view for rooms.

### Room info

|                      | Type  |                        |
| -------------------- | ----- | ---------------------- |
| `{{item.sub_title}}` |       |                        |
| `{{item.has_logo}}`  | 0 / 1 | If the room has a logo |
| `{{item.url_logo}}`  |       | URL of the logo        |

### Settings

`{{item.is_featured}}`

`{{item.rate}}`: includes the price and the currency (ex: $ 252.00)

`{{item.booking_engine_url}}`

`{{item.url}}` :  link of the detail page of the room. If not defined, it will fallback to the external\_link.

`{{item.external_link}}`

### Features

| Key                      | Type   | Description                                 |
| ------------------------ | ------ | ------------------------------------------- |
| `{{item.total_area}}`    | Number | Total area. Can only contain number for now |
| `{{item.max_adults}}`    | String |                                             |
| `{{item.bed_type}}`      | String |                                             |
| `{{item.floorplan_url}}` | String | Link to a document with the floorplan       |

### Amenities

{% code title="room-detail.html" %}

```markup
{if="'{{item.nb_amenities}}' != '0' "}
    #$loop|{{item.room_amenities}}|{amenitie}| $#
        <div>
            {if="'{amenitie.has_logo}' == '1' "}
                <img src="{amenitie.url}" aria-hidden="true">
            {/if}
            <div>{amenitie.name}</div>
        </div>
    #$/loop|{{item.room_amenities}}|{amenitie}| $#
{/if}
```

{% endcode %}

More information here:

{% content-ref url="room/room-amenities" %}
[room-amenities](https://galaxy-cms.gitbook.io/project/module/fields/room/room-amenities)
{% endcontent-ref %}

### Documents

{% code title="room-detail.html" %}

```markup
{if="'{{item.nb_document}}' != '0' "}
    #$loop|{{item.room_document}}|{document}| $#
        <a href="{document.url}" target="_blank">{document.titre}</a>
    #$/loop|{{item.room_document}}|{document}| $#
{/if}
```

{% endcode %}

### Category

`{{item.room_category_name}}` to have the **name** of the current category of the room

`{{item.room_category_id}}` to have the **id** of the current category of the room

To get all rooms from the same category:

{% code title="room-detail.html" %}

```markup
#$loop|{room,[room_category_id={{item.room_category_id}}]}|{a}|$#
    <div>{a.name}</div>
#$/loop|{room,[room_category_id={{item.room_category_id}}]}|{a}|$#
```

{% endcode %}

### Media (image / video)

has\_video

has\_photo

videos

photos
