FP2003 Reformatting my Include statements

  • Thread starter Thread starter -Bob-
  • Start date Start date
B

-Bob-

FP2003 insists on reformatting my code so that any "include"
statements
end up wrapped at the end of the preceding statements and typically
the following statement ends up wrapped at the end. All I have to do
is switch to design view and it does it.

So, for example, this:

<body>
<!--webbot bot="Include" U-Include="header.htm" TAG="BODY" -->
<table width="730" >

Ends up like this:

<body><!--webbot bot="Include" U-Include="header.htm" TAG="BODY"
--><table width="730" >

It would not be so bad except that in reality, those statements have
many more details on them and there are multiple includes, so it ends
up quite convoluted and unworkable.

The odd thing is that this does not happen with some of my sites, but
it does with others. In fact, if I import a page with similar
statements from a site that does not do it, it will start doing it in
the new site.

Suggestions ?
 
Click Tools > Page Options > Code Formatting and set the right margin to a
higher number.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
Click Tools > Page Options > Code Formatting and set the right margin to a
higher number.

Steve:

It's not the right margin, although I tried you fix to be sure.
The lines it is wrapping are no longer than 60 or so characters each.
It's actually removing the line returns and gluing the lines together.
I also turned on the "allow line breaks" within tags feature but, as
expected, that had no effect on this issue.

Note that it only happens where there's an <!--include -> statement
 
The only "solution" I have found is to go to menu->Tools->Page
Options->Code Formatting tag
Find Comment in the tag drop-down box, and set to Line Break After End (or
Line Break before start, or both). Then, in code view, right click and
choose Reformat HTML.

This cures the include-page webbot problem, but may cause problems with
other HTML comments where you don't want these line breaks each comment.
 
Your code sample indicates one of the problems w/ FP design time tools
- they are entered as comments which are treated by FP differently than Html code
First get your FP code formatting back in order for the cleanest code formatting
- In Tools Page Options Code Formatting select Reset, then set your right margin to 9999
(you don't want Allow line breaks within tags enabled)
Next I recommend you always put a include webbots in a valid html container (div or table) to have FP treat it as html container
content instead of page content, and more importantly prevent mismatched tag pairs in the final page - for example

<body>
<table><tr>
<td><!--webbot bot="Include" U-Include="header.htm" TAG="BODY" --></td>
</tr></table>
<table width="730" >

or
<body>
<div><table><tr>
<td><!--webbot bot="Include" U-Include="header.htm" TAG="BODY" --></td>
</tr><tr><td width="730">
<table width="730" > ........</table>
</td></tr></table></div>

or (will cause a line break after each div)
<body>
<div><!--webbot bot="Include" U-Include="header.htm" TAG="BODY" -->
</div>
<div> <table width="730" > ..... </div>

--




| On Fri, 14 May 2004 14:31:58 -0400, "Steve Easton"
|
| >Click Tools > Page Options > Code Formatting and set the right margin to a
| >higher number.
|
| Steve:
|
| It's not the right margin, although I tried you fix to be sure.
| The lines it is wrapping are no longer than 60 or so characters each.
| It's actually removing the line returns and gluing the lines together.
| I also turned on the "allow line breaks" within tags feature but, as
| expected, that had no effect on this issue.
|
| Note that it only happens where there's an <!--include -> statement
 
The only "solution" I have found is to go to menu->Tools->Page
Options->Code Formatting tag
Find Comment in the tag drop-down box, and set to Line Break After End (or
Line Break before start, or both). Then, in code view, right click and
choose Reformat HTML.

I follow the theory... but it didn't work. It's still all wrapping
into one mess.

The weird thing is that other "sites" that I've built with nearly the
exact same code do not have this problem.
 
Your code sample indicates one of the problems w/ FP design time tools
- they are entered as comments which are treated by FP differently than Html code
First get your FP code formatting back in order for the cleanest code formatting
- In Tools Page Options Code Formatting select Reset, then set your right margin to 9999
(you don't want Allow line breaks within tags enabled)
Next I recommend you always put a include webbots in a valid html container (div or table) to have FP treat it as html container
content instead of page content, and more importantly prevent mismatched tag pairs in the final page - for example

Thanks Stefan. That may help in the body section... but I also have
includes for some meta tags that are used throughout the site. I can't
use a <div> or <table> container there without other implications.

Also, the <table> tag that immediately follows the <body> tag is still
getting wrapped into the body tag - even with the table there.

I'll play with the other settings a little more and see if I can get
any of the "break" settings to do something helpful.
 
Bob,

What type of includes are you using, as you can not use FP Includes to place any content above or
below the <body>....</body> tags on a page, such as in the <head>..</head> section of a page?

All FP Include and Shared Borders pages must have the standard set of HTML page tags.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Bob,

What type of includes are you using, as you can not use FP Includes to place any content above or
below the <body>....</body> tags on a page, such as in the <head>..</head> section of a page?

I do use them in the head section... but removing those specific
includes still does not fix the wrap issues in the body section.
All FP Include and Shared Borders pages must have the standard set of HTML page tags.

All do, thanks.
 
Back
Top