Placing HTML Code fragments in the <head> section

L

laskowv

In publisher 2003, where exactly would you place a html code fragment to
ensure that it would end up in the <head> section, or any other section, when
you select the "Publish to the Web" option?
 
D

DavidF

You can't use the insert code fragment tool to insert into the head section.
However, if you are trying to use a code snippet that instructs you to put
one part in the head and the other in the body, go ahead and insert both in
the body, and it may still work.

DavidF
 
M

Mike Koewler

David,

It may work, but more than likely will not, especially when some JS goes
in the <head> area and another part in the <body>. I suppose the only
way to do it is to publish to disk, open the htm(l) file in Notepad or a
similar editor and add the code there. Does Pub rewrite the page when it
is published anew? That would be a PITA to have to do this every update.

Mike
 
D

DavidF

Mike,

You are absolutely correct that it shouldn't work, but for some reason it
does in many cases with Publisher. I have tested a number of freebie code
snippets including javascript, that said the first part had to go into the
head section, and was surprised to see that they did work.

And yes, you could Publish to the Web and direct the html output to your
computer, and open each page, and edit the code, and yes, it would be a
PITA. A better choice is to find a different freebie code snippet, and try
them until you find something that does work via the insert code fragment
tool.

DavidF
 
L

laskowv

Currently, I do publish to the web and then open EVERY page with notepad and
insert the code; this is painstaking!! I wish Microsoft would add a field to
the Web Site/Page options for a "favicon"; the same as they did with
Description and Keywords. Then it would build in the <head> section as they
do.

I've been using Publisher to do websites for these volunteer organizations,
but this gets tedious when the number of pages increases. I have just
acquired Adobe GoLive CS2 -- and am starting my learning curve.

I did get the favicon code to go into the <head> section once last year, but
I can't remember how because the page was changed several times after that
and it never worked for me again.

Thanks for everyone's responses.
Valerie
 
L

laskowv

I do put them there, but you have to do it EVERY time. Publisher regenerates
each page when you "publish to the web"; and you have to do this in order for
your newest changes to take place.
 
D

DavidF

Perhaps I am misunderstanding, but if you upload you favicon.ico file to the
root directory at the same place you load the index.htm and index_files
folder, then that file will not be overwritten when you update your
Publisher content. The code snippet is just inserted via an insert html code
fragment, and would not have to be redone either. Did you read the link?

DavidF
 
D

DavidF

Perhaps I am misunderstanding, but if you upload you favicon.ico file to the
root directory at the same place you load the index.htm and index_files
folder, then that file will not be overwritten when you update your
Publisher content. The code snippet is just inserted via an insert html code
fragment, and would not have to be redone either. Did you read the link?

I have also read where if you just want one favicon.ico per site, you don't
even need to use the code...just upload the favicon.ico to your root
directory and it will be found when someone adds the site as a favorite in
IE.

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