Strategies for DWTs, style sheets, and includes

G

Guest

I've developed a reasonable working knowledge of html, CSS, DWTs, and
includes over the last few months; probably just enough to be dangerous.
I've been re-working my sites to aline to and take advantage of these
capabilities but would like to get some comments from the more experienced in
these areas on the strategies I've been working through on their use.

To start, there are some basic assumptions I have on DWTs and Includes I
want to validate.

"DWTs will always create the entire <head> section." If this is true then
the style sheet links, the meta data (names, etc.), and the scripts will be
the same for any page that use the same DWT. The strategic implication is,
that if I want to use a different style sheet, for example, I will need to
create a separate DWT even if the structure defined in the two DWTs is
exactly the same. This is sort of the inverse of the approach used at
cssZenGarden.com for example.

The approach that would maximize creating modular, reusable components of a
site while eliminating having to put redundant copies of the <body> in each
DWT would be to perhaps use an Include for the entire <body> section while
only varying the <head> stuff. Is that a sound approach or are there other
ways to work with the DWT rules but allowing <head> sections to vary for
different major subsections of the site.

"Includes only bring in <body> sections". For navigation I use a pull-down
menu technique. For related pages in a subsection of a site, the menus, and
their pull-downs, are exactly the same, however, they change between the 1st
and 2nd levels of the site structure (i.e. the top level pages all use the
same menus, but each major 2nd level have their own which is consistent
through all pages at that level within a subsection.)

My thought was to use Includes that change from DWT to DWT to pull in the
html that defines the menu being used. This means that, rather than having
to copy/paste all the menu code every time I change the content of the menus,
I could create a new DWT with a different Include for each menu structure and
make any menu changes in the separatly included <body> code with the changes
being replicated automatically into the pages.

Before I jump into changing the basics of the site I wanted to make sure I
had a solid strategy based on a good understanding of the character and
functioning of DWTs and Includes.

Thanks for any advice.

Tom
 
R

Ronx

My strategy is to use one DWT for all .htm pages, but to have editable
regions in the <head> section and in the <body> use different editable
regions for menus and content.
The DWT itself has default content in these editable regions.
The menus are include pages, but being in an editable region the include
can be changed on a per page basis.
If there were many pages in a particular section using the same menus, I
would create a copy of the DWT for that section, using a different included
menu as the default.

The editable regions in the <head> allow for additional style sheets, meta
tags etc. to be added on a per page basis.

A copy of this DWT can be found at www.rxs-enterprises.org/dwt/site.htm
 
M

Murray

BINGO. That's my strategy too, with a bit of modification. I identify four
types of content -

1. Content that will never change for the life of the site and that is
present on all pages - that goes into the template.
2. Content that *may* change during the life of the site, and that is
present on all pages - that goes into includes present in the non-editable
regions of the template
3. Content that is page specific and is present on multiple pages in the
site - that goes into includes in the editable regions of the template
4. Content that is page specific, and appears on a single page in the
site - that is what the editable regions are for.

Examples of type 1 content - all page layout boilerplate.
Examples of type 2 content - head links/tags/javascript; mastheads; footers;
definitely site navigation elements.
Examples of type 3 content - section naviation elements; sidebar contents;
section-specific graphics/content.

I use all of the tools at my disposal when I build sites....
 
G

Guest

Thanks both of you. I realized that there is an error in my basic assumption
that you can't have editable regions in the <head> section of a DWT.

I love this forum! It has been SOOOO helpful to me as I work my way through
the learning curve on web work.


Off the topic (because I can't get on the other parts of the forums), am I
the only one having trouble with the forums (response time, bad "read and
respond" links in email notifications)? For a couple weeks the MSFT forum
site (multiple areas) has timed out and I now am getting email notifications
of post responses that end up with "unfound" pages using the Read and Respond
link.

Thanks

Tom
 
R

Ronx

am I the only one having trouble with the forums

I do not use the forums. I read newsgroups. The link

news://msnews.microsoft.com/microsoft.public.frontpage.client

will open this group/forum in Outlook Express.
 
G

Guest

Hi Ron,

I meant newsgroups.

Thanks for the earlier post and the link to the DWT. I'm still running into
a problem getting editable regions in the head section. I followed the help
instructions that says to go to Design and then.... But in Design, I don't
think the head section is available.

To get editable regions in the head section do you have to enter them
manually?

Thanks

Tom
 
G

Guest

Tried news. So when you want to reply to a post (like I'm doing here on the
forum) it appears that it creates and email message (to you at a hotmail
account in this case). Is that the right technique or do I reply to a group?

Also, I use Outlook normally. Can I set this up there instead?

Thanks

Tom
 
R

Ronx

Inline

--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/

tcarp said:
Tried news. So when you want to reply to a post (like I'm doing here on
the
forum) it appears that it creates and email message (to you at a hotmail
account in this case).

No. It creates a new post that includes a reference to the post you
replied to.
Is that the right technique or do I reply to a group?

You reply to the group
Also, I use Outlook normally. Can I set this up there instead?

No - Outlook does not support newsgroups.
 
R

Ronx

Either click on it from what you are reading now (if it is an active link)
or paste it into Internet Explorer address bar.
 
G

Guest

I pasted it into IE, then the messages appeared in OE, but only posts from
5/27 through 5/30. Then I tried to "reply to the group" to ask you how to
get other posts to appear, but I received the message, "The message could not
be sent. No sender was specified, even though "
Microsoft.public.frontpage.client appeared automatically in the "To" box. I
changed that to "Http://www.micro........etc. - but still no send. Also,
how do I search and start a new thread?
Thank you.
 
R

Ronx

The error was referring to your details.

In Outlook Express

Tools->Accounts
Click the News Tab
If msnews.microsoft.com appears then highlight and click Properties

On the general tab, fill in your Name (as it will appear on the newsgroup)
and email address. I strongly suggest a munged address (such as
(e-mail address removed)), or one that you don't mind receiving huge
volumes of spam. My Hotmail address is set to delete everything on
receipt, spam or otherwise.

The ServerTag - leave as is - the server should be msnews.microsoft.com

Connection Tag - leave as is

Advanced Tag - Leave as is. News(NNTP) Port number should be 119

Click OK


If msnews.microsoft.com is not in the News list, then click Add->News and
follow the Wizard. It will ask for the details shown above.

To get more messages, click Tools->Get more Headers
The headers will download in blocks of 300 - this group gets an average of
220+ posts each day (less at weekends). You can change this setting using
Tools->Options
On the read tab either clear the box "Get xxx Headers at a time", or change
the number.
As a guide, I have 6830 messages for this group from 1st April.

To reply to a post, click Reply to Group button
To start a new thread, Click New Message button.
 
G

Guest

Murray, you and Ron were quite helpful with the strategies I asked about.
I've made all the changes based on your suggestions and things are fitting
together very nicely.

The next thing I ran into in this general topic of modularizing for
flexibility is the style sheets. I have to go back an re-read the spec on
cascading, but do you use a strategy for modular style sheets. For example,
do you use one for the basic structure (body, .wrapper, .container, etc.) and
then one for the other structural components, and perhaps a third for the
detail styling? Or do you rely more on the cascading rules (which, if I
recall, were a little complicated) to give you reusability and modularity in
styling?

Thanks

Tom
 
M

Murray

I build my SCREEN media stylesheet from the top of the page down. This, in
effect, gives me the 'modularization' I need. If I have to go back in,
after the fact, and add some more styles, I make sure to put them with the
proper selectors. I use lots of ID and descendent selectors, so that if I
want to see everything that applies to div#sidebar, I know how to do that.

Then I'll build a separate stylesheet for other media, as needed.

Finally, I handle (almost) all *hacks* with IE conditional comments. I
dislike putting hacks into my stylesheets.
 
E

eclipsme

Murray said:
I build my SCREEN media stylesheet from the top of the page down. This, in
effect, gives me the 'modularization' I need. If I have to go back in,
after the fact, and add some more styles, I make sure to put them with the
proper selectors. I use lots of ID and descendent selectors, so that if I
want to see everything that applies to div#sidebar, I know how to do that.

Then I'll build a separate stylesheet for other media, as needed.

Finally, I handle (almost) all *hacks* with IE conditional comments. I
dislike putting hacks into my stylesheets.

I am just trying to follow the conversation here -

Its the 'div#sidebar that bothers me. Is this how you are entering it
into the style sheet Murray? I thought #sidebar was the way for a single
division on a page, or .sidebar for multiples. What does div#sidebar do?

And BTW - Murray, I can't tell you how grateful I am for the amount of
help, support and kindness you show on this newsgroup as well as on
dreamweaver. I have learned a great deal from your posts to others, and
esp. those directed at me.

I would like to purchase a small gift certificate for you at your
favorite on-line store, if you will share that information with me. Can
I use the email address you attach in your sig (without laughing, of
course)? My email is harvey-at-acols.com.

Thanks,
Harvey
 
M

Murray

Harvey:

I am touched. But no remuneration is necessary. Consider it an investment
in your future. When you win the REALLY BIG BUCK, then I'll come
knocking.... 8)

I used that nomeclature to emphasize that I was talking about a div with
that ID. You would certainly enter it in the stylesheet as #sidebar, as you
suspected.
 
E

eclipsme

Murray said:
Harvey:

I am touched. But no remuneration is necessary. Consider it an investment
in your future. When you win the REALLY BIG BUCK, then I'll come
knocking.... 8)

I used that nomeclature to emphasize that I was talking about a div with
that ID. You would certainly enter it in the stylesheet as #sidebar, as you
suspected.

Thank you Murray. I know none is necessary, but really! It'll be Amazon,
or perhaps PetSmart if you don't tell!

Harvey

BTW - Lassie found Timmie. I'm still trying to learn!
 

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