# Accommodation list

You will use the accommodation list shortcode or bloc to display a **list of accommodation types**. You can decide the number of columns to use, if you wish to include a booking form and a button to link to the detailed presentation of the accommodation type, which accommodation types you wish to display in the list (with shortcode only)…

You will include the “Description displayed in the Accommodation list” in the [Descriptions](../../hbook-documentation/accommodation-types.md#descriptions) section of the accommodation type settings.

<a id="shortcode-hb_accommodation_list"></a>

## Shortcode \[hb\_accommodation\_list\]

Use the **\[hb\_accommodation\_list\]** shortcode to display a list of accommodation.

**Parameters:**

- **accom\_ids:** use this parameter to choose to display only some accommodation types in the list. Indicate the ids of the accommodation types you wish to display. Default : empty (so all accommodation types will be displayed)
- **nb\_columns:** use this parameter to specify how many columns you wish to be used to display the list of accommodation. This will be the maximum number of columns used. Default: 2.
- **book\_button:** use this parameter to add a booking form below the accommodation presentation. Default: yes.
- **view\_button:** use this parameter to add a button “View details” which will open the accommodation page in a new tab. Default: no.
- **redirection\_url:** if you set “book\_button” to “yes”, you might wish to redirect your clients to your main booking page for the next booking steps. Indicate here the url of the page you wish to redirect them to
- **show\_thumbnail:** use this parameter to choose whether to display an accommodation thumbnail. Default: yes.
- **thumbnail\_link:** here you can set if you wish the thumbnail to have a link to the accommodation page or not. Default: yes.
- **title\_link:** here you can set if you wish the title to have a link to the accommodation page or not. Default: yes.
- **title\_tag:** use this parameter to change the title heading (h1, h2, h3, h4,…). Default is h2.
- **thumb\_width:** use this parameter to change the width of the thumbnail. Default is 150px.
- **thumb\_height:** use this parameter to change the height of the thumbnail. Default is 150px.

> [!INFO]
> **Examples**  
> \[hb\_accommodation\_list view\_button="yes" book\_button="yes" redirection\_url="https://mywebsite.com/booking-form/ " nb\_columns="4" \]  
> \[hb\_accommodation\_list thumbnail\_link="no" title\_link="no"\]  
> \[hb\_accommodation\_list title\_tag="h4" thumb\_width="300" thumb\_height="200"\]  
> \[hb\_accommodation\_list accom\_ids="12,14,24,37" book\_button="no"\]

* * *

<a id="accommodation-list-block-gutenberg"></a>

## Accommodation list block - Gutenberg

![accommodation-gutenberg.png](./attachments/accommodation-gutenberg.png)

1. Select the **number of columns** to use
2. Indicate if you wish to display the thumbnail of the **featured image**
3. Indicate if you include a **link to the accommodation page** for the thumbnail
4. Specify the **width** of the thumbnail
5. Specify the **height** of the thumbnail
6. Indicate if you wish to display a button to **View the accommodation**, which will open a new tab with the accommodation page.
7. Indicate if you wish to display a button **Book now**, which will display the booking form once clicked
8. If you have set that you wish to display a “Book now” button, indicate the **Redirection** page. Customers will be redirected to the page indicated in this parameter to enter their details and continue the booking process.

* * *

<a id="additional-settings"></a>

## Additional settings

- **Links opening :** en [HBook > Appearance > General settings](../../hbook-documentation/appearance-settings.md#appearance-general-settings), you can set if you wish the links, for the accommodation thumbnail and title, to open in the same tab, or in a new tab.
- **Page used for presentation** : You can set that you use a different page for the presentation of the accommodation than HBook **Accommodation Types**. This can be set in the section [Display options](../../hbook-documentation/accommodation-types.md#display-options).
- **Thumbnail size** : the parameters of the accommodation list shortcode or block, related to the height and width of the thumbnails, are applied only to the accommodation list thumbnails and links.  
For the thumbnail of the search results, you will find a setting in [HBook > Booking form > Accommodation selection](../../hbook-documentation/forms-customization/search-form-and-accommodation-selection.md#accommodation-selection-form).