开发者

Sharepoint: Setting url in onet.xml NavBar

开发者 https://www.devze.com 2023-02-16 10:28 出处:网络
I have the following NavBar element in my onet.xml. It adds the link \"Link\" to the quicklauch bar, but seems to ignore the body attribute. I\'m particularly interested in setting the href to what I

I have the following NavBar element in my onet.xml. It adds the link "Link" to the quicklauch bar, but seems to ignore the body attribute. I'm particularly interested in setting the href to what I want (/Lists/Link/AllItems.aspx), but it doesn't work. Any help?

I'm working on Moss 2007.

<NavBar Name="Link"
    Prefix="&lt;table border=0 cellpadding=4 cellspacing=0&gt;"
    Body="&lt;tr&gt;&lt;td&gt;&lt;table border=0 cellpadding=0 cellspacing=0&gt;&lt;tr&gt;&lt;td&gt;&lt;img src='/_layouts/images/blank.gif'
    ID='100' alt='' border=0&gt;&amp;nbsp;&lt;/td&gt;&lt;td valign=top&gt;&lt;a ID=onetleftnavbar#LABEL_ID# href='/Lists/Link/AllItems.aspx'&gt;#LABEL#&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;"
    Suffix="&lt;/table&gt;" ID="1033" 开发者_开发知识库/>


the problem is that the URL is relative to the root site, so try using the site context with:

 Url="_layouts/[%=System.Threading.Thread.CurrentThread.
      CurrentUICulture.LCID%]/yourpage.aspx"

Hope this may help.

0

精彩评论

暂无评论...
验证码 换一张
取 消