Mystery table on the home page ... solved!

Brian V Hughes
Fri, 22 Mar 2002 17:47:24 -0500

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. ;->

-Brian, Alan's co-worker
Brian V. Hughes                          <>
Webmaster                                Dartmouth College Computing Services
Webmaster Group                          Communications Services

--On 03/22/2002, Scott Granneman wrote:
>Why does this mystery table appear in my home page code?
>The problem: a weird table is getting inserted into the HTML on your
>home page. You haven't inserted the HTML for this table in your code.
>Manila is obviously inserting it, but why? And how do we get rid of it?
>The reason: if you state in your Preferences that your site is a news
>site, but you don't insert the calendar into your Home Page Template,
>then Manila inserts the "mystery table" into the code for the home page.
>The solution: fool Manila into thinking you inserted the calendar onto
>your home page. Anywhere in the Home Page Template, insert this:
><!-- \{calendar} -->
>(That's an HTML comment with a calendar macro in the middle; however,
>preface the calendar macro with a backslash)
>Thanks to Alan German & his co-worker for discovering this fix.