Mystery table on the home page ... solved!
Mon, 25 Mar 2002 10:24:50 +0000

I made this discovery independently a while back.,

I didn't find it that mystifying though. I just took it that since 
all navigation was designed to go through the calendar, there had to 
be a calendar. So if the user didn't specify one, it had to be placed 
somewhere.  Now the logic get's  a bit weaker, but someone tried to 
make it  "look good".  If you remember that much of this code was 
created when the state of the art  of HTML was layout with tables, 
then it make some sort of sense.

>  You're welcome, Scott! It took me close to three hours to track this
>  down the other day. And when I found it, I was really quite baffled
>  by it. I found that I just couldn't follow the logic in the script.
>  For those that are interested, this occurs in
>  manilaSuite.renderNewsPage (), which is called from the default
>  object at the top of any standard Manila web site.
>  In the bundle that actually builds the page, there is a flag called
>  flSysopPlacesCalendar that is set to true if the string "{calendar}"
>  exists in the home page template. For some reason, if this string
>  doesn't exist in the template, then the body of the home page is
>  placed into the left-most column of an interior nested table, which
>  appears to exist to allow space for the home page calendar. But, that
>  extra HTML only gets added if the {calendar} macro doesn't exist in
>  the template?!
>  As you can imagine, I was quite perplexed by this fact. Fortunately,
>  you can fool Manila into not adding in that extra HTML by placing a
>  the {calendar} macro into your home page template, and simply
>  choosing to not display it. You can further cut down on the weight of
>  your page by inactivating the macro by preceding it with a backslash.
>  It's a complete hack, but it arrives at much cleaner HTML code for
>  your Manila home page. Of course, this is only really of interest to
>  those of us using Manila for a non-news/non-weblog style of web site,
>  which really isn't playing to Manila's strength, but I like being
>  able to use the Discussion Group. ;->


- David Bayly.       Programmer and digest reader.     dbayly at udena dot ch
   		Digest Readers do it once a day.