Sharepoint 母版页中的相对 URL [英] Relative URLs in Sharepoint master page

查看:44
本文介绍了Sharepoint 母版页中的相对 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有标签的母版页.这些选项卡由以下站点地图文件定义:

I have a master page with tabs. The tabs are defined by the following sitemap file:

<siteMap>
    <siteMapNode title="Home" url="~/" >
        <siteMapNode title="Schedule" url="~/Pages/Tab2.aspx"/>      
        <siteMapNode title="Deliverables" url="~/Pages/Tab3.aspx"/>
        <siteMapNode title="My Items" url="~/Pages/Tab4.aspx"/>
        <siteMapNode title="Management" url="~/Pages/Tab5.aspx"/>
        <siteMapNode title="Working Docs" url="~/Pages/Tab6.aspx"/>
    </siteMapNode>
</siteMap>

问题在于,在我的子站点上,单击选项卡会不断将我带回根目录.例如,我希望计划链接转到 http://Server/Subsite/Pages/Tab2.aspx.相反,我得到的是 http://Server/Pages/Tab2.aspx.我读到在链接的开头使用波浪号可以解决这个问题,但事实并非如此.

The problem is that on my subsites, clicking on a tab keeps taking me back to the root. For example, I want the schedule link to go to http://Server/Subsite/Pages/Tab2.aspx. Instead, what I am getting is http://Server/Pages/Tab2.aspx. I read that having a tilde at the beginning of the link would solve this problem but it doesn't.

推荐答案

您正在寻找 ~site 令牌,这里是 WSS 自定义的 URL 标记列表.

You're looking for the ~site token, here's a list of the URL tokens custom to WSS.

这篇关于Sharepoint 母版页中的相对 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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