Create user friendly URLs

M

Mimi

I am using Pub 2003.

When you Publish to the Web, and Save, for eg. under the file name
"index.htm", it results in the htm file being named "index.htm" along with
an "index_files" folder containing the remaining pages and graphics. This
also results in the URL containing "www.......index_files/pagetitle".

Is there an easy way to have an URL omitting "index_files" (the folder name)?

Ive attempted the below method:

To move the htm files out of the folder and edit them using Notepad, to
update the image locations, eg: replacing text starting '<v:imagedata
src="image...' with '<v:imagedata src="index_files/image' which has been
successful, but there is an auto shape that I do not know how to update,
leaving my webpage missing the blue border around the company name. It shows
on the homepage, but not on the others.

Was this the easiest way to do this? If yes, please could you advise on how
to update the autoshape to reflect the border on the other web pages?

website: http://www.georgespicer.enfield.sch.uk (autoshape visible around
company name)
and http://www.georgespicer.enfield.sch.uk/headteacher.htm (autoshape missing)
 
S

Spike

Go to >> tools >> Web page options >> website options
UNCHECK the box Organize supporting files in a folder
Republish and all your files will be in one directory and the index_files
folder will not appear

Spike
 
D

DavidF

The main problem with your approach is that you will have to redo all those
edits each time you update your site, which seems to me very impractical.
And even if you try, chances are you will end up with errors such as you
have now. The navbar links are likely to fail and are going to be hard to
change unless you don't use the navbar wizard and manually build one. I
guess I am saying I wouldn't advise it....you are just going to create
problems for yourself.

You really have only two choices. You can live with the standard naming
convention when you use a subfolder or you can choose to not use a
subfolder. Go to Tools > Options > Web tab and uncheck the option to use the
supporting folder. While you are there also uncheck the "Rely on VML..." and
the "Allow PNG..." options if you haven't already.

When you do not use the supporting folder then when you Publish to the Web
and generate your web files they will all be "loose" together. Publisher
will also name the pages and images differently too. Assuming you still use
index.htm as the default name for your home page then your head teacher page
will be named index_headteacher.htm instead of headteacher.htm, so you won't
have the subfolder index_files in the link path, but index will be attached
to the page name. The pictures associated with that page will be called
headteacher_####.jpg instead of ####.jpg . To see the difference just
Publish to the Web and direct your output to a folder somewhere on your hard
drive where you can study the files.

While I can appreciate what your goals are, I really don't think it will
make any difference to the person that views your site. Yes, the link will
be a little longer, but it is pretty short compared to many. Sorry there
isn't a way to change the way Publisher names the files, but if I were you I
would just live with the subfolder naming convention.

DavidF
 
M

Mimi

I agree with reverting back to the standard naming convention. After playing
around with the htm files, I left myself confused. It was a little ambitious
as Ive just discovered Publisher this week and never built a web page before.

Thank you so much for the quick response.

I have another question. My navigation bar works smoothly, with exception to
when I go to 'Contact Us' and click on 'Prospectus'. Im just not able to get
the PDF link to work here. It works fine everywhere else, but not here. I
have gone back to Publisher. Any suggestions, please?

Mimi
 
D

DavidF

Mimi,

First an answer and then a couple suggestions.

The reason the 'Prospectus' link works on your home page (index.htm) and not
from any of the other pages is that you forgot to factor in the fact that
the other pages of your site are in the index_files folder, and you uploaded
your .pdf file to the same level as the index.htm file. Here is the path to
your pdf: http://www.georgespicer.enfield.sch.uk/prospectus.pdf
Here is your javacript code snippet:

href="javascript:Show('prospectus.pdf',%20'newwindow',%20'toolbar=no,scrollbars=yes,resizable=yes,height=750,width=750')"

Change the link on all the other pages of your site, other than the
index.htm file. Tell the browser to look one level up in the directory for
the pdf file and it will find it. Just add a forward slash in front of the
file in the snippet: '/prospectus.pdf'. Alternatively I would put the full
path...the absolute link to the pdf file in the script so you don't confuse
yourself with a relative link.

That will fix your immediate problem, but now as to the suggestions. First
of all your pdf file is way too large. It is 9.09 megs which took me 5
minutes per meg to download...yes, 45 minutes on a dial up connection. And
even if I had a high speed connection, I probable would not wait, or get
very irritated at least, downloading such a large file. I don't know how you
created that file, but there is no reason for it to be that large. If your
pdf generating program has the option, set it to generate a pdf suitable for
on-line viewing vs. printing. This will reduce the file size significantly,
and given the fact that the document is all black and white text, it will
still print well too. I used the pdf creator www.primopdf.com which is free,
printed your file to the primopdf printer, and chose the on-line mode. It
reduced your file size from 9 megs to 791 KB. Even that file size will take
me around 4 minutes to download, but that is reasonable for a 26 page
document.

Suggestion number two...take this out of your navbar. This is not another
page in your website. It is an external document that you are making
available to the viewer for download. It does not belong in the navbar.
Perhaps create a small text box below the navbar, describe what the file is
with a few sentences, and then link to it. I would also put the size of the
file beside the link in parenthesis: (791 kb)...or if you insist on the huge
file size (9.09 meg) and that at least will warn people about how long it is
going to take to download. You might also warn people that the file will
open in a new window...

Suggestion three...I have mixed feeling about use the javascript to open the
pdf file in a new window. I understand why you are doing it, but I am not
sure it is necessary. So though I am ok with you using it, I would certainly
not dictate the size and attributes of the window. I would just write it
such that it will open in a new window at what ever the default is for that
viewer. There are times where dictating a specific type and size of a window
is appropriate, but I don't see it as appropriate here. What if the person
want to save a copy to their computer to read and study later? What if they
want to print it? The toolbar isn't there so they can do none of those
things. I would suggest that you remove the window attributes from the code
snippet, and just set it to open in a new window or if the user has their
browser set as such, a new tab. Remove the height, width and set the tool
bar to yes. Much more user friendly in my opinion.

And finally, if it were me, I would create a subfolder on your host to
contain this pdf file and any other file you might want to make available.
Read this article:
Including external files in a Publisher web:
http://msmvps.com/blogs/dbartosik/archive/2006/01/07/80561.aspx

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