Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a html custom master page with html links. I am currently using static url's to link to pages and wondered if there is a way I can use a dynamic path in asp or sharepoint language so that when I export to a production environment, I won't need to change the links manually.

I am looking for something like this, if it's possible:

http://<site url here>/Pages/Newpage.aspx

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You could use relative paths, like in most web development, like

/_layouts/images/hello.jpg

Or use SPUrl tokens inline in the src or href attribute. See more here: http://hristopavlov.wordpress.com/2008/12/08/urlaction-tokens-of-the-customaction-feature/

This link is 2007, but most tokens should still be valid!

share|improve this answer
    
thanks that helped a lot. –  binga30 May 2 '13 at 6:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.