Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Website layout 1

Status
Not open for further replies.

lorenzodv

Programmer
Feb 16, 2001
95
IT
Hi.

You know that many professional sites have a fixed layout for their pages (say a header with logo/title, a navbar, a footer, etc.) and only the contents of the page vary.

As they do not use frames, I would like to know if they just include all they "layout" HTML code (that is always the same) in all pages or use a combination of SSI/CSS (or something) to have it in one fixed place.

Copying it in any pages is not convenient in my opinion, because if you want, for example, to add an option to the navbar, you have to edit hundreds of pages.

Please help me clearing my doubts.
Thanks.

Lorenzo
 
Templatized layouts do, indeed, typically employ lots of acronyms like PHP, JSP or SSI -- sometimes even CGI (though the overhead of running a site through that medium makes that option nearly as insane as putting the same code in each page). There is also a popular web application server called Zope ( which allows for easy maintenance of templatized websites.

Hope this helps,

brendanc@icehouse.net
 
Could someone give a more detailed explanation of this?
 
We use css stylesheets (seperate ones IE / Netscape/ Printing) a lot to determine our sites layout and design. I'd throughly recommend them as they make updating and revising across the whole site very easy.

For what it's worth we laid out some general html authoring guidelines and then defined headers / footers / table classes in the stylesheets. This sets both the physical layout - margins / positioning etc - and the appearance - size, color etc.

However - the majority of our html is generated on the fly using oracle and pl/sql and we have set routines ( printHeader; / printFooter; etc) that ensure the layout is consistent. We are also quite reliant on tables to keep styles across large blocks of text and long reports.

For most of our select box options (i.e dates / report types) we hold a series of bash scripts (i.e /cgi-bin/developer/select_group.sh) in one folder that either read from the database to generate the options dynamically or return a list when called from the html like so;

<SELECT NAME=&quot;Report&quot; onchange=&quot;UpdateLink()&quot;>
<!--#exec cmd=&quot;\$DEVELOP/cgi-bin/developer/select_group.sh&quot; -->
</SELECT>

A simple awk script to read a .lst list file of trading groups will look something like;

#/usr/bin/bash
set -f
echo Content-type: text/html
echo

awk '{printf (<option value=\&quot;%s\&quot;>%s\n, $1,$0)}' $DEVELOP/data/group.lst

and will fill in the select options. This obviously makes updating menus / nav bars etc much easier as all you do is either alter the script or the .lst file.

Re: zope / templates etc I don't know a great deal about these but hope I've been of some use. Anything else or you want me to elaborate then just shout. Also apologies if I've pitched things at the wrong level as I have no idea what you know / don't

Cheers :)

Joe.
 
Use use SSI extensively on our web sites.

I call in navigation bars, headers, footers, etc.

Virtually 95% of our entire site contents are SSI driven.

To top it off, I use an SSI editing script to manage the SSI's from one central location.

I can manage my entire site using a browser. » » » » » »
Mike Barone
FREE and Pro CGI/Perl Scripts

FREE Scripts
 
Two questions:

1) Can you give me an example of CSS layout [for headers and such]? Or point me to a good example / tutorial / explanation? I'm only familiar so far with CSS text control.

2) Does anyone out there use ColdFusion extensively for includes and layout? Any good examples?

Thanks
 
um, right. Any ColdFusion sites besides tek-tips.com ... ever heard of that one, by the way?
:)
 
Well, if you are looking to keep a consistant feel, then templates and includes work quite well.

We use them on intranet sites and it takes very little to maintain. All the dynamic info is handled by includes in the body. The menu's are driven by an applet that pulls from a Db. The look and feel is handled by CSS (for the templates and includes) and for some sites, headers and/or footer includes are added, depending on what that site is trying to accomplish.

The moral of the story is that changing one line to point to a different file instead of 234 different times PER ELEMENT is just a better way of doing things.

Oh, and in some cases, the body of the pages are date incremented as well so nothing but the upload of the include is necessary (which of course is templated so the EU can't muck up the design).

&quot;Absorb what is useful, discard what is not. Add what is uniquely your own.&quot; - Bruce Lee - The Tao of Jeet Kune Do
 
>>The look and feel is handled by CSS (for the templates and includes) ...

Are you talking about text control only, or positioning/color/etc. of any other elements? I seem to hear a lot about CSS being used for more than just text formatting, but I've rarely seen a concrete example ... I'm just wondering if I'm missing something.
 
CSS covers fonts, table, text, scrollbar formatting etc. Here is a list of what CSS can do.

If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top