trying to create a web page with relative links

S

sam

Maybe this is an impossibility with Publisher, but I'm trying to create a
web page with relative links rather than absolute links for its graphics. It
would seem like the simplest thing to do, but I'm not finding a way how.

This seems to be an area of weakness in all Microsoft products; but at least
in Word, you can select to "link to" an image, and then if the image is in
the same folder as the main document, it's saved as a relative link. In
Publisher, it doesn't seem to work this way.

With absolute links, if you move the folder, all the links stop working.
Which can be quite aggravating...

Thanks in advance for any hints...
Doug
 
D

DavidF

Both relative and absolute links are dependent upon the directory structure.
If you change the directory, move a folder, then the links need to change.
If you use the navbar wizard in a Publisher produced website, and change the
pages around, add pages etc, it will automatically recreate relative links
to those pages when you create the new html files. If you are using the
subfolder option in Publisher, all the supporting graphics are contained in
the index_files folder, and the path to those graphics are also changed when
you edit your original Publisher document.

In fact Publisher copies the original graphic from your Publisher document
and makes various different copies and formats of those images with the goal
of providing the best image depending on what browser is used by the viewer
of the website. If you insert the graphics into the Publisher document, you
have no control over that, and if you change the location...the path to
those graphics, then the graphics won't load in your browser. The only way
to gain more control is to import the graphics. This can be done, but it
will require quite a bit more work.

If you want to import your images, please post back with a better, more
detailed explanation of what you are trying to do.

DavidF
 
S

sam

Thanks for your reply, David. Actually all I was trying to do was create a
quick and easy web site. I've never used Publisher, but it looked pretty
user-friendly, so I gave it a try.

I ran into trouble when I was unable to publish the site directly to my
host. Entering the FTP address of my web site caused Publisher to freeze,
and Publisher couldn't find the server when I entered the URL, so I finally
gave up.

I normally maintain web sites using an FTP program, so I went that route.
But when I published my site to a folder on my computer and then tried to
upload the files to my web host, none of the graphics appeared on the page,
since the links were all "absolute" -- pointing back to locations on my
computer. Bummer.

Reading the Publisher help files, I see that I can modify hyperlinks and
make them into "simple links" (I normally keep all files of a web page in
one folder, so no paths are necessary), but I find no way to modify links to
graphics embedded in a page. I tried using the "insert picture" command, and
also tried the little "link to" feature, but both result in absolute links
if I publish the web page to a folder on my computer.

Lacking any other solution, I edited the HTML files to correct the links,
but of course this isn't a long-term solution, since it means I'll no longer
be able to do any editing in Publisher.

Thanks in advance for any further advice...

Doug
 
D

DavidF

Doug,

By default when you Publish to the Web to produce your html files, Publisher
will generate an index.htm file (the home page) and an index_files folder
which contains your additional pages and graphics. You would upload both the
index.htm file and the index_files folder to your host. FTP uploading
protocol is fine unless you are using a form on a page of your publication.

If you are getting absolute links to the graphics, then that would imply
that you are probably using a Master Page(s) in your Publisher document.
Master pages should only be used in print documents with Publisher. You get
unpredictable results in a web page, one of which can be absolute links to
the images on your hard drive, and those images not showing on your site.
Remove all the master pages, move all the content to the publication pages
and insert your images. Delete your old html files on your host, File >
Publish to the Web, and upload your new files.

Your images should then show. If they don't they may simply be too large.
Either resize and optimize your images for the web in a third party image
editing program before you insert them into your publication, or compress
them from within Publisher before you Publish to the Web. Reference:
Compress graphics file sizes to create smaller Publisher Web pages:
http://office.microsoft.com/en-us/publisher/HA011266301033.aspx

If you prefer having all your files in one folder, then you can change the
default of using the subfolder. Go to Tools > Options > Web tab and uncheck
"Organize supporting files in a folder". While you are there, also uncheck
"Rely on VML..." and "Allow PNG...", and this will also result in smaller,
faster loading pages.

DavidF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top