Confused about .dwt

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

I have been trying to understand how to use a .dtw. I have read several
tutorials but would like to use it to control page width among other things.
Is it designed to control page width? I don't see any changes to the page
width after saving the .dwt to an attached page. Thanks.
 
A dwt template can control every aspect of a page's presentation provided
you build the proper code into it. For example, if I add this to my CSS
styles in the DWT file -

body { width:780px; }

then all child pages will have their content constrained to 780px width.
However, this would in no way constrain your ability to make the browser
viewport wider or narrower.

So - what is it you are wanting? Do you want to control the page width or
the browser viewport width?
 
Thanks for the quick reply. Not being a "coder" I was trying to set the
width of the .dwt page in Table Properties, save it and thought that width
would propogate to the page I had selected. Do I have to add the width in
code view or is there some other way? It is the page width, not the browser
viewport width, that I want to control.

By the way, I see where you used 780px as your example. I was told to use
765 so people wouldn't have to scroll horizontally. Should I use 780? Thanks
again.
 
780px was just an example that popped into my head. To be sure, 765px is a
good width to use.

The notion of templates is sometimes difficult to grasp. But if the entire
page's content is within that outer table, and if you set that outer table
to a width of 765px, then all child pages of that template will have the
same width table on it. Note that if that table is NOT within an editable
region, then all child pages will subsequently reflect any changes you might
make to this width in the parent template.
 
Murray, you really are helping but I am still confused. It seems to me that
MS has made the .dwt pretty complicated and maybe they had to for the .dwt
to be useful.

I am fairly sure that a .dwt can be attached, unattached and then reattached
to one or more pages. I know that this can be done with one or more .dwt's
in the same Web. I think any region on either the .dwt or child pages can be
made editable or noneditable as long as at least one region on the .dwt is
editable.

However, I never thought about a child page being able to reflect changes
back to the .dwt. If I understand you correctly, and a change from a child
page is reflected back to the .dwt, then is that change from the chuld page
to the .dwt passed onto all the other already attached child pages the next
time the .dwt is saved?
 
However, I never thought about a child page being able to reflect changes
back to the .dwt. If I understand you correctly, and a change from a child
page is reflected back to the .dwt, then is that change from the chuld
page to the .dwt passed onto all the other already attached child pages
the next time the .dwt is saved?

No, you have misinterpreted my post. Changes only propagate from template
to child. And it's only changes to template non-editable regions that do
so.
 
Back
Top