我有以下代码,它根据您所在的页面更改了导航栏。它很好,除了在一个案例中我想在意大利时将4个按钮改为5个城市名称(罗马,梵蒂冈,弗洛伦斯,威尼斯和米兰)。我该怎么做?
<!-- Hero nav section -->
<div class="no-gutter">
<ul id="nav">
<li><a href="<%= Application["baseURL"].ToString() + Session["lang"] + "/"+country+"/"+cityName+"/"+cityName+"-tours"%>"
<%if(url.Contains(cityName + "-tours")){%>class="current"<%}%>><% if (cityName == "washington-dc") {%>Washington, D.C.<% } else {%><%= cityName.Replace('-', ' ')%><%; } %> tours</a></li>
<li><a href="<%= Application["baseURL"].ToString() + Session["lang"] + "/"+country+"/"+cityName+"/private-tours"%>"
<%if(url.Contains("private")){%>class="current"<%} %>>private tours</a></li>
<li><a href="<%= Application["baseURL"].ToString() + Session["lang"] + "/"+country+"/"+cityName+"/nextday-tours"%>"
<%if(url.Contains("nextday")){%>class="current"<%}%>>next day tours</a></li>
<li><a href="<%= Application["baseURL"].ToString() + Session["lang"] + "/"+country+"/"+cityName+"/sale-tours"%>"
<%if(url.Contains("sale")){%>class="current"<%}%>>sale tours</a></li>
</ul>
</div>
编辑***
我可以输入if语句并选择意大利或其他吗?对于城市我有类似的东西,但也许我可以为国家改变它?
<% if (cityName == "rome")
{%>
<!-- <p>Explore the wonders of the “Eternal City” with City Wonder’s unique Rome tours. <a href = "javascript:void(0)" onclick = "document.getElementById('rome').style.display='block';document.getElementById('fade').style.display='block'">Read More</a></p> -->
<%}%>