On these pages you will need to insert unique content. You will want to use variables to help you do this. If you'd like to insert the city name, you can use $city.City. To insert the state name, you can use $state.StateProvinceName and to insert the state abbreviation, use $state.StateProvince. If you plan to generate pages for international properties you should use this "if" statement any time you use the state variable:
#if($Util.stringHasValue($state.StateProvinceName)) $state.StateProvinceName#end
This site is a great resource for $city.City, $state.StateProvince hotels and much more!
If you're looking for information about $city.City travel you've come to the right place.
#* In addition to one generic paragraph that would work for any city, you will want more specific information for cities that have a lot of hotels. "If statements" are used to add unique content to specific city pages. Below is an example of an "if statement". Any time an "if statement" is used, it has to be ended by using pound(#)end.
To build an "if statement" that will allow you to include content for more than one city you can use "elseif". See the "Las Vegas" example below. YOu also have the ability to include information from specific files. For example, you may have a large amount of information on the San Antonio area in a text document. You can use the example below for San Antonio as a guideline for inserting the contents of that file into your San Antonio page. You will save the text file to the main level of the page-generator folder and then place the include statement wherever you would like the information to appear.*#
#if ($city.City == "New York")
This is where you insert your information for New York.
#elseif ($city.City == "Las Vegas")
This is where you insert your information for Las Vegas.
#elseif ($city.City == "San Antonio")
#include ( "San-Antonio.txt" )
#end
#*This div layer builds the breadcrumb top navigation list. All Countries > Country > State > City. You can delete the portions of the navigation you do not need here. Keep in mind that any time you delete an "if" you need to also delete the corresponding "end"*#
#set( $url = "../continents.html")
#set( $url = $Util.prepURL("${url}","-"))
All Countries
:
#set( $url = "../country/${country.CountryCode}.html")
#set( $url = $Util.prepURL("${url}","-"))
$country.CountryName
#if ($Util.stringHasValue($state.StateProvinceName))
:
#set( $url = "../state/${countryIn} ${state.StateProvince}.html")
#set( $url = $Util.prepURL("${url}","-"))
$state.StateProvinceName
#end
:
$city.City
#* This page should have a H1 tag containing your targeted search phrase. *#
$city.City#if($Util.stringHasValue($state.StateProvince)), $state.StateProvince#end Hotels
#* This is the main content of the page. *#
#foreach( $hotel in $hotela.getCity($cityIn,$stateIn,$countryIn) )
#set( $url = "../hotelinfo/${hotel.hotelID}.html")
#set( $chain = $chaina.getChain($hotel.chaincode))
#if ($Util.stringHasValue($hotel.imageURL))
#end
$hotel.Name
$hotel.Address1
$hotel.City, $hotel.StateProvince $hotel.PostalCode
Nightly Rates: ( $Util.formatDecimal($hotel.LowRate) - $Util.formatDecimal($hotel.HighRate) )
#if ($hotel.starrating!="-1")
$hotel.starrating Star
#end
#set( $description = "${hotel.PropertyDescription} ${hotel.LocationDescription}")
$Util.substring("${description}",0,240)...more
#end