Have you tried something like this: <a href="<% $SPUrl:~sitecollection%>/SiteDirectory/SitesList/NewForm.aspx?Source=<% $SPUrl:~sitecollection%>%2FSiteDirectory%2FPages%2Fcategory%2Easpx">Add Site</a>
You will need to reference the following in your page though for this to work: 1: <%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 2: <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 3: <%@ Register TagPrefix="PublishingVariations" TagName="VariationsLabelMenu" src="~/_controltemplates/VariationsLabelMenu.ascx" %> 4: <%@ Register Tagprefix="PublishingConsole" TagName="Console" src="~/_controltemplates/PublishingConsole.ascx" %> 5: <%@ Register TagPrefix="PublishingSiteAction" TagName="SiteActionMenu" src="~/_controltemplates/PublishingActionMenu.ascx" %> I had a post on my blog about this as well - it's at http://pointstoshare.spaces.live.com/blog/cns!AEC42F315B4528B0!2911.entry Brian Farnhill Consultant Technical Consulting Direct: 02 6225 4307 Main: 02 6225 4333 Mobile: 0408 289 303 Fax: 02 6225 4334 Email: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> Web: www.uniqueworld.net<http://www.uniqueworld.net> Blog: pointstoshare.spaces.live.com<http://pointstoshare.spaces.live.com/> Microsoft Certified Application Developer [cid:[email protected]] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Noone Sent: Tuesday, 16 September 2008 12:32 PM To: [email protected] Subject: [OzMOSS] Using static tokens for URLs within Layout Pages Does anyone know if it's possible to use the ~sitecollection and ~site tokens within the content placeholder of a Layout Page in order to provide dynamic URLs at run-time? We are providing some custom elements within the pages and I'm trying to avoid having to update the absolute URLs when we move to production. e.g. <asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server"> <div class="ms-globalright ms-toolbarContainer"> <a href="~sitecollection/SiteDirectory/SitesList/NewForm.aspx?Source=~sitecollection%2FSiteDirectory%2FPages%2Fcategory%2Easpx">Add Site</a> </div> ... Kind regards, Paul ________________________________ ____________________________________________________________________________ This e-mail is intended for the use of the addressed recipient(s) only and may contain confidential and privileged information. If you have received this message in error, please delete the message and any attachments and copies immediately; and notify the sender by return e-mail. Any views expressed in this message or any attachments are those of the individual sender and do not necessarily represent the corporate opinion of the Catholic Education Office (CEO), Sydney. The CEO Privacy Policy is located at http://www.ceo.syd.catholic.edu.au ____________________________________________________________________________ ------------------------------------------------------------------- OzMOSS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com ------------------------------------------------------------------- OzMOSS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com
<<inline: image001.jpg>>
