Skip to content

Relative links in Link list changed to Absolute links when saved in template

October 11, 2011

You want to create a list template (stp) that is based on the links list and contains some relative links. You create the list, save as template, everything looks ok but when you move the template to a different environment (dev to test) you find out that the links in the template were converted to absolute links and point to your original environment.

You need to modify the manifest.xml in the stp file, and change the link from absolute to relative. Here are the steps:

  1. Rename your listtemplate.stp to
  2. Doubleclick on the cab file, extract the Manifest.xml
  3. Edit the manifest.xml, replace the absolute links to relative links and then save the file. (each link appears 3 times in the file)
    <Field Name='URL'>/Pages/myPage.aspx, Link title</Field>
    <Field Name='URLwMenu'>/Pages/myPage.aspx, Link title</Field>
    <Field Name='URLNoMenu'>/Pages/myPage.aspx, Link title</Field>
  4. Open a Visual Studio Command Prompt, use makecab.exe to recreate the cab package:
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>makecab c:\manifest.xml c:\

That should do the trick. It is working for me, at least.


From → MOSS 2007, WSS 3.0

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: