重定向到站点地图中的同一页面时出现问题 [英] Problem while redirecting to same page in sitemap

查看:84
本文介绍了重定向到站点地图中的同一页面时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi all

I entered all details of pages in xml.but one page sitemap not coming as i mean.
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <!--<siteMapNode url="~/EmployeePortal/Index.aspx" title="Home"  description="Home" >-->
  <siteMapNode url="~/User/UserApplications.aspx" title="Applications"  description="Applications">
   <siteMapNode url="~/User/TicketDashboard.aspx" title="Ticketing Dashboard"  description="Ticketing Dashboard" >
     <siteMapNode url="~/User/Ticket_Details.aspx" title="Ticket Details"  description="Ticket Details" />
      <siteMapNode url="~/User/NewTicket.aspx" title="Create Ticket"  description="Create Ticket"/>
     <siteMapNode url="~/User/My_Tickets.aspx" title="My Tickets"  description="My Tickets">
       <siteMapNode url="~/User/Ticket_Details.aspx?page=1" title="Ticket Details"  description="Ticket Details" />

     </siteMapNode>

     </siteMapNode>


  </siteMapNode>
</siteMap>
In this case apperaing as
applications<ticketing dashboard< ticket details but i want sitemap as

applications<ticketing dashboard<my tickets< ticket details why its not coming by my code

Thanks in advance

Amrutha

推荐答案

您的意思是这样的吗? />

Do you mean like this???


<sitemap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
  <!-- <siteMapNode url="~/EmployeePortal/Index.aspx" title="Home"  description="Home" >  -->
  <sitemapnode url="~/User/UserApplications.aspx" title="Applications" description="Applications">
    <sitemapnode url="~/User/TicketDashboard.aspx" title="Ticketing Dashboard" description="Ticketing Dashboard">
      <sitemapnode url="~/User/My_Tickets.aspx" title="My Tickets" description="My Tickets">
        <sitemapnode url="~/User/NewTicket.aspx" title="Create Ticket" description="Create Ticket" />
        <sitemapnode url="~/User/Ticket_Details.aspx?page=1" title="Ticket Details" description="Ticket Details" />
      </sitemapnode>
    </sitemapnode>
  </sitemapnode>
</sitemap>


你好Amritha444,

是的,我了解您的问题,在我看来,您有一个一个 XML文件,您可以在整个网站中使用该文件进行导航,(问题1-是这样吗?)

而且站点地图XML文件中的XML数据不会更改(因为您使用的是固定或完全限定的路径,(问题2-也是吗?)

如果您对上述问题1和2都回答是,则问题不是不是在XML网站地图中,而是在您用来从网站地图XML URL属性中解码,解密或提取信息的代码中

您对上述问题(第1季度和第2季度)有什么答案?
您回答是和是吗?两个问题?

如果这样做,则应发布用于从XML文件提取信息并建立指向目标或目标页面的链接的代码.


我会冒险猜测您对两个问题都回答是,因为您的路径(sitemapnodes的url属性)是固定的或完全限定的.

因此,在XML FILE中没有错误,但是在用于将数据从URL转换为页面链接的方法中没有错误.
Hello Amritha444,

Yes I understood your problem and it seems to me like you have one XML file which you use for navigation throughout your website, (Q1 - is this right?)

And that the XML data in the sitemap XML file does not change (because you are using fixed or fully qualified paths, (Q2 - is this right too?)

If you answer YES to both the questions 1 and 2 above then the problem is not in your XML site map but in the code your using to decode, decipher or extract the information from your sitemap XML URL attribute

What are your answers to the questions (Q1 and Q2) above?
Do you answer YES and YES? to both questions?

If you do then you should post your code that you use to extract the information from the XML file and build the link to the target or destination page.


I would hazard a guess that you answer Yes to both the questions because your paths (url attribute of sitemapnodes) are fixed or fully qualified.

Therefore there are no errors in your XML FILE but in the method you use to convert the data from the URL into a page link.


这篇关于重定向到站点地图中的同一页面时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆