I am having the same problem and need help. I'm not sure the original poster explained it well so I'll try to re-phrase the issue:
1) I create a web site that I want to make into a template (including the content.)
2) I use the Portals tab and create the template, including the content (no problem so-far)
3) Now I create a new Portal and select the template (poof ... the site created fine)
4) Now comes the problem ...
In the template site, there was content that got imported, but all of the image references (<img>) and links (<a>) are EXACT copies of the template web site ... meaning that, if the original image tags pointed to files in the original portal's folder, the new site also refers to the same files IN THE ORIGINAL PORTAL'S FOLDER. Even worse is the fact that, links that took you to other pages within the original portal now refer to the same TABID's in the ORIGINAL portal, not this newly-created one!
I can work-around the image problem by executing a SQL UPDATE statement against the DESKTOPHTML column of the HTMLTEXT table to replace the old portal path (let's say "/Portals/2/") with the new portal's folder (like "/Portals/23/") for only the rows associated with the new Portal.
The larger problem is the link problem - I have no idea how to "know" each old TABID and its corresponding new TABID to perform a replace if I so dared.
This is, unfortunately, a really big problem for a project I am working-on. Help!!??!! Please?