I'm interested in the last approach.
Can you write a sample project for the
NetDynamics Developer Connection?
Thank you very much.



>> Cristina wrote:
>> > In case you need many different navigation menus, you just
>> > have to build header1.html, header2.html, etc and SPIDERINCLUDE
>> > them accordingly... Is that right?
>>
>> Yes, exactly.
>>
>> For example, you could have a few pages use header1.html,
>> and a few other pages use header2.html, etc.
>>
>> If you want to get more elegant, and know how we really do it
>> here at NetDynamics, we have a hierarchy of header files so
>> we can do shared look-and-feel among all of our projects,
>> while also allowing each project to customize the navigation.
>>
>> We create a folder in the Projects directory called
>> "include", and a subfolder of that called "template"
>> like this:
>>
>>   c:\NetDynamics\NetDynamics50\Projects\include\template\
>>
>> Within this folder, we have a "first level" header and footer
>> that has the standard Sun Microsystems look and feel, which
>> has things like the Sun logo, the top navigation bar,
>> and the purple navigation column on the left-hand-side.
>> The footer has the typical Sun copyright, legal, etc.
>>
>> To prevent namespace collisions (we are planning on a very big scale)
>> we name these files like Java packages:
>>
>>    com.sun.header.html
>>    com.sun.footer.html
>>
>> Next, we have a "second level" header and footer that is
>> specific to our NetDynamics business unit. This has things
>> like our navigation search (see http://www.netdynamics.com
>> and compare it to http://www.sun.com to see the difference),
>> our header graphic that says "NetDynamics App Server Platform",
>> and a few other things.
>>
>> These files are:
>>
>>   com.sun.netdynamics.header.html
>>   com.sun.netdynamics.footer.html
>>
>> Finally, we have a "third level" header and footer that
>> is specific to each section of our website, such as
>> Support, Training, Products, etc. This is where we
>> define the left-hand-side links, and other invisible
>> things like search terms, section owner contact info, etc.
>>
>> These files are:
>>
>>   com.sun.netdynamics.support.header.html
>>   com.sun.netdynamics.support.footer.html
>>   com.sun.netdynamics.training.header.html
>>   com.sun.netdynamics.training.footer.html
>>   etc.
>>
>> So in our NetDynamics projects for our technical support,
>> we edit the HTML page templates and put this at the top:
>>
>>   [[SPIDERINCLUDE SRC=include/template/com.sun.header.html]]
>>   [[SPIDERINCLUDE SRC=include/template/com.sun.netdynamics.header.html]]
>>   [[SPIDERINCLUDE SRC=include/template/com.sun.netdynamics.support.header.html]]
>>
>> And this at the bottom:
>>
>>   [[SPIDERINCLUDE SRC=include/template/com.sun.netdynamics.support.footer.html]]
>>   [[SPIDERINCLUDE SRC=include/template/com.sun.netdynamics.footer.html]]
>>   [[SPIDERINCLUDE SRC=include/template/com.sun.footer.html]]
>>
>> All of this makes it superbly easy to build new web sections,
>> because it is using a kind of inheritance. It also makes it
>> simple to change the look-and-feel of our entire website.
>>
>> I highly, highly recommend this kind of approach.
>> It has worked extremely well for us for many years,
>> and there are great payoffs in terms of standardization
>> and ease of navigation for all of your end users.
>>
>> It also makes it feasible to replicate our look-and-feel
>> in any other kind of appserver, servlet, and cgi script.
>> For example, we use exactly the same templates in our
>> perl scripts that handle our online technotes, and we
>> also use the same templates in tools like DreamWeaver.
>>
>> Now for step two, which is what I will be creating for the next version of
>> the NetDynamics website.  I decided that I wanted more dynamic template
>> capabilities, and that I was willing to sacrifice the flexibility of using
>> the templates in other appservers, servlets, cgi scripts, and editors.
>>
>> So I am writing a Java class that takes a variety of input parameters,
>> coming from several sources (parse the URL, CSpPriveleges, CSpSession)
>> and generates a totally dynamic "navigation wrapper" around the main
>> content.
>>
>> > >Or, you can do it the second way: write a simple Java class that
>> > >generates the navigation, and inserts it into the output stream.
>>
>> > This is not clear to me... Which output stream are you talking
>> > about? Would the class be inserted once, in some central place,
>>
>> In my class, I build a String "contents" that has all my headers,
>> navigation, HTML <head> and <title> and <body> tags, and then
>> I override the typical output stream like this:
>>
>>   CSpStringOutputStream out = CSpider.getOutputStream ();
>>   CSpHttp.reset ();
>>   CSpHttp.setAutoMode (false);
>>   out.write (contents);
>>   out.flush();
>>
>> On each page, I call this Java class. I also deleted edit
>> each page's HTML template to delete things like <html>
>> and <head> and <body> and anything else I want to handle
>> myself.
>>
>> If enough people here are interested in this approach,
>> let me know and I will write a sample project for the
>> NetDynamics Developer Connection.
>>
>> Cheers,
>>
>> Joel
>>
>> ____________________________________________________________________________
>>
>> Joel Henderson
>> [EMAIL PROTECTED] - 1-800-558-2197
>> Sun NetDynamics Web Manager
>> http://sun.com/netdynamics/
>
>
>


_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to