Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Relative addressing in sharepoint

  Asked By: Nilay    Date: Feb 02    Category: Sharepoint    Views: 1958

I have created a series of site collections within my web application, each relating to a particular area of the business. Each site collection has a list which contains (among other things) URLs to images within the site collection, used to brand selected pages of that site collection.

The problem is this. Let's say my site collection has an address http://www.companyname.com/departments/finance, and the address of an image is http://www.companyname.com/departments/finance/images/logo1.jpg, I have added a URL to my list of /images/logo1.jpg but this is being resolved as http://www.companyname.com/images/logo1.jpg instead. I assumed that it would take the full site collection address before appending the logo url, but this doesn't seem to be the case. Is there any way round this?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Judy Pittman     Answered On: Feb 02

If you are putting these links inside a compiled page (i.e. page layout or master page), you can use the following syntax to define the link to a file within a specific site  collection:

<% $SPUrl:~SiteCollection/images/file.jpg%>

 
Didn't find what you were looking for? Find more on Relative addressing in sharepoint Or get search suggestion and latest updates.




Tagged: