IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
These pages display detailed information about a specific hotel or restaurant. In addition, it gives suggestions about visiting other places in same city – restaurants or hotels.
NOTE: Hotels and restaurants content types have similar structure and both hotel and restaurant pages are identical in design, so the tutorial guides you only through the creation of the Hotels page and you can create the other is in similar manner.
You can display detailed information about a hotel by dropping the Hotels widget on the page and configuring it to display only hotel’s details.
To do this, select the One particular hotel only... and do not select a specific hotel. This way, the hotels widget displays only details view of the currently navigated in URL hotel. For example ~/ hotel/united-states-of-america/new-york/the-edison-hotel. You also set the Details item template of the hotels widget to My Vacation - Full hotel content template.
The following screenshot shows the display of Hotels widget:
Use the following markup for My Vacation - Full hotel content template:
To display information about the city (parent item) and the country (grandparent) of the currently displayed hotel, you can use chain Eval of ParentItem property like this:
<%# Eval("ParentItem.ParentItem.Name") %> / <%# Eval("ParentItem.Name") %>
When you need to have more contextual information about the parent item, for example, a label See also Restaurants in New York, or display child items of the parent item from another type, you can extend the detail template of the hotel item.
This can be achieved by adding the following code to the template:
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important