Is it possible to reference more than 10 individual hotels from the "accommodation" collection in the "reviews" collection using Webflow?
Published on
September 22, 2023
Yes, it is possible to reference more than 10 individual hotels from the "accommodation" collection in the "reviews" collection using Webflow. Webflow allows you to create relationships between collections through reference fields. Here's how you can achieve this in Webflow:
- Create the "accommodation" collection:
- Go to the Collections tab in the Webflow Designer.
- Click on the "+ New Collection" button and name it "accommodation."
- Add any necessary fields to the "accommodation" collection, such as hotel name, description, images, etc.
- Create the "reviews" collection:
- Click on the "+ New Collection" button again and name it "reviews."
- Add fields for the review content, rating, author, etc.
- Add a reference field:
- In the "reviews" collection, add a new field of type "Reference" (or "Multi-reference" if you want to select multiple accommodations per review).
- Name the field something like "accommodation" or "hotel."
- In the field settings, select the "accommodation" collection as the referenced collection.
- Connect the reviews with accommodations:
- In the "reviews" collection, open a review item and select the hotel(s) it is associated with in the "accommodation" reference field.
- You can select one or multiple accommodations depending on the field setting.
- Display the connected data:
- On the reviews template page, add a Collection List element to display the reviews.
- Within the Collection List, you can add elements (such as text or images) to display the details of the connected accommodations (e.g., hotel name, description).
By establishing the reference field between the "accommodation" and "reviews" collections, you can connect and display individual hotels from the "accommodation" collection in the "reviews" collection. This way, you can display multiple hotel reviews for each hotel in an organized and efficient manner.
Additional Questions:
- How do I create collections in Webflow?
- Can I connect multiple collections in Webflow?
- Can I create dynamic content using reference fields in Webflow?