This page displays detailed information for a specific city. Hotels and restaurant suggestions are listed as well. In addition, it displays information about other places in the country of the current city
You can display detailed information about a city by dropping the Cities widget on the page and configuring it to display only city details. In order to do that, select the One particular city only... option and do not select a specific city. This way, the cities widget displays only details view of the currently navigated in URL city. For example, ~/city/united-states-of-america/new-york. You also set the Details item template of the cities widget to My vacation - Full city content template.
The following screenshot shows the display of Cities widget:
Use the following markup for My vacation - Full city content template:
NOTE: Hotels and Restaurants pages must contain Hotels and Restaurants widgets that are configured to display items from currently opened City.
Hotels are direct children of the currently opened in the URL item (city) and you can display them by dropping the Hotels widget on the page, and configuring it to display hotels From the currently open city. In addition, you need to set details page for the hotels to be the Hotel page. As list item template, select My vacation - List of hotels - Thumbnail And All hotels Link.
The following screenshot shows the display of Hotels widget:
Use the following markup for List of hotels - Thumbnail And All hotels Link template:
Restaurants are direct children of a City. This means that you can apply the same configuration as for the Hotels widget above. For displaying restaurants list, you use the My vacation - List of restaurants - Thumbnail and All restaurants Link template.
The following screenshot shows the display of Restaurants widget:
Use the following markup for My vacation - List of restaurants - Thumbnail and All restaurants Link template:
When you are in a specific city, you may want to display additional information about the country that may be interesting for the users. Displaying information about the current country of the displayed city means displaying information about the parent item – Country.
To show information about the cities and festivals in a country you can drop the Countries widget, and configure it in the following way:
The following screenshot shows the display of Countries widget:
Configuring the countries widget in this way, gives you the ability to easily display information about it in the widget template. For example, showing cities and festivals requires only two Eval methods and two repeaters.
Use the following markup for My Vacation - More in Country (List of cities and festivals) template:
To display all cities from a country, you can use the auto generated property Cities to access all child items.
When child type is added to the module structure, Sitefinity CMS generates automatically property descriptors for each child type and enables you to get all child items an Eval statement.
You can display all Festivals in the same way.
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
Copyright © 2021 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity