ad_header
)ad_header
in /tcl/ad-defs to do something more dramatic (e.g., display a company logo at the top right of each page).ad_footer
in /tcl/ad-defs to do something consistent at the bottom of all the pages on a siteregsub
calls in ad_serve_html_page
(in /tcl/ad-html) to consistently change the appearance of outgoing pages.
If you're building from scratch, you could build in ADP instead of HTML and use ns_register_adptag
to augment the HTML a bit.
ad_header
or your static HTML to reference a cascading style sheet (CSS). See the HTML chapter of Philip and Alex's Guide to Web Publishing for an explanation and also do a View Source on the document to see a style sheet reference from the HEAD of a document.
This doesn't work out too great because (1) only the 4.0 browsers interpret style sheets, and (2) Brand M and Brand N browsers do very different things given the same instructions (each implements a subset of the CSS standard).
So what's the big deal? Let them write whatever HTML they want.
The problem is that they want control over pages that are generated by querying the database and executing procedures but they don't want to learn how to program. Your naive solution is to let the designers build static HTML files and show them to you. You'll work these elements into Tcl string literals and write programs that print them to the browser. In the end you'll have programs that query the database and produce output exactly like what the designer wanted... on Monday. By Friday, the designer has changed his or her mind. Would you rather spend your life attacking the hard problem of Web-based collaboration or moving strings around inside pages?
To: Web Developers I want you to put all the SQL queries into Tcl functions that get loaded at server start-up time. The graphic designers are to build ADP pages that call a Tcl procedure which will set a bunch of local variables with values from the database. They are then to stick