SharePoint User Group UK

Share the knowledge!

Welcome to SharePoint User Group UK Sign in | Join | Help
in
Home Blogs Forums Photos Files Roller

Relative URL's

Last post 05-08-2008, 2:17 PM by Hope4sun. 5 replies.
Sort Posts: Previous Next
  •  05-08-2008, 11:25 AM 10543

    Relative URL's

    I am having a bit of difficulty using the relative URL's within SharPoint. On my masterpage I have added the following link.

    <a href="<%$SPUrl:~Site/_layouts/viewlists.aspx %>" runat="server" >View all site content</a>

    when I save it I am shown an error in SPD and on the page(page doesn't load) :

    An error occurred during the processing of . The expression prefix 'SPUrl' was not recognized.  Please correct the prefix or register the prefix in the <expressionBuilders> section of configuration.

     

    Anyone have any ideas? I have seen other people experiencing this however no solutionw as ever given. Is it a case of the site being WSS rather than MOSS?

  •  05-08-2008, 11:40 AM 10547 in reply to 10543

    Re: Relative URL's

    Have you got the publishing web control prefix registered on the page?

    <%
    @ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

    Andrew Carter
    .Net & SharePoint
  •  05-08-2008, 12:11 PM 10552 in reply to 10547

    Re: Relative URL's

    hmmm... I added that to the site and still the same issue. I take it this means I am required to use this within MOSS instead of WSS.

    is there a valid method for WSS?

  •  05-08-2008, 12:16 PM 10553 in reply to 10552

    Re: Relative URL's

    Yes, the publishing feature is only for MOSS (with the publishing feature enabled), so there isn't a way to use that method in WSS.

    However, if you're just looking to reference the layouts pages, you can simply use a single forward slash, which will always provide access to the site root, such as:

    href="/_layouts/blah...."

     


    Paul Leigh
  •  05-08-2008, 1:45 PM 10557 in reply to 10553

    Re: Relative URL's

    bugger.. seems to be lot of functionality missing from wss.

    Will have to make do with absolute urls.

  •  05-08-2008, 2:17 PM 10560 in reply to 10557

    Re: Relative URL's

    Opps teach me not to read the thread fully, did'nt take in the WSS bit only  =o  , but yes there is a lot of functionality in MOSS that WSS does not have.

    Andrew Carter
    .Net & SharePoint
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems