Squishdot DTML Organization 
Zope DTML 
Butch Landingin 
butchland@yahoo.com 
1 
stuff-to-read 
This article delves into the structure and composition of the DTML methods that make up 
 Squishdot. Hopefully, this will serve as a guide for those of you who wish to modify the 
 look and feel of Squishdot and need to understand the interdependence of 
 the methods and associated folders. 
%% 
<H3>The Main page</H3> 
The main page (index_html) displays the list of squishdot articles.  
 It consists of the site header, the main table and the site footer. 
<P> 
The main table consists of three columns,  
 the leftmost column containing leftbox options, the middle column containing 
 the articles themselves, and the rightmost column containing the various squishboxes 
 specified in the rightbox options.  
<P> 
In the case where the TinyTable product is not  
 available and the default leftbox items and right box items are not loaded, each set of 
 options are rendered by hardcoding them into the DTML, instead of being iterated 
 over a table. 
<P> 
The site header (site_header) contains the advertising banner and the topic image url list, as well 
 as several properties such as the title images, the page title and the border background 
 color. 
<P> 
The site footer (site_footer) contains a search form, the quotation, the copyright announcement as well 
 as the list of bottom links. Additional code is also provided so that if in case the TinyTable 
 product is not available and the bottom items table is not loaded, then the bottom links are 
 rendered by hardcoding them into the DTML, instead of iterating over the table. 
<P> 
Each article contains the title, summary, topic subject, the topic image associated with the 
 topic subject as well as a link to the read more page for the given article id. 
 
<H3>The Read More page</H3> 
The read more page (posting_html) displays the summary and body of the article, the comments, 
 the optional file attachment, as well as some related links. It also displays the same left hand 
 options as the main page, except for the addition of links to navigate back to the main table. It also 
 provides a link back to the body of the article if you have navigated deep into a comment thread. 
<P> 
The read more page consists of the site header, site footer and the main table. The site header 
 and site footer are the same ones used in the main page. 
<P> 
The main table consists of three columns, with the leftmost column similar in content to the leftmost 
 column in the main page, except for some additional hardcoded links discussed above. The right hand 
 column contains a squishbox containing items and URLs related to the article. If a file was attached to  
 to the main article then a squishbox containing it would also be displayed. 
<P> 
The middle column contains the summary and body of the article. In addition, adjoining rows contain the 
 comments and replies to comments. This section probably contains the most complicated set of DTML tags 
 in squishdot and represent an attempt to create a hierarchical display of comments.  
<P> 
In the case that the number of comments exceed the threshold set in the comment spillover property in 
 the Properties page, only the titles, names of the author and posting time are displayed along with  
 a link to the body of the comment is displayed. 
 
<H3>The Add Posting page</H3> 
The add posting page is used for adding both a main article and for replying, albeit using differing 
 parts of the page to do so. It contains the same site_header and site_footer used everywhere else. 
 It has a main table consisting of two(2) columns, with the leftmost column containing the same left box 
 items as the main page. 
<P> 
The main column contains a form for submitting the article or comment for adding to the database. Depending 
 on what object called it, it either displays an submission form for a main article or a comment. If it's a 
 submission form for a comment, it displays the original article or comment to which you are replying to for  
 convenience. <B>Note:</B> One the things we will be working on for the next feature release (0.3) will be to 
 to add a preview page so that you can see exactly what your article or comment will look like prior to finally 
 committing it to the database permanently and allow you to edit it or back it out of submission completely. 
 
<H3>The Preview Posting page (new for ver. 0.3.0)</H3> 
The preview posting page is used for previewing both main article and replies, by using differing 
 parts of the page to do so. It contains the same site_header and site_footer used everywhere else. 
<P> 
It integrates the contents of Read More page (posting_html) with the Add Posting page. The Preview posting 
 page is displayed when the preview button on the Add Posting page is pressed or if the add button is pressed 
 but an error message is displayed -- instead of transferring back to the add posting page, pressing OK on 
 the error message display will go to the Preview posting page enabling you to see how your posting would look 
 prior to actually submitting it. Otherwise, the structure of the tables on the page are the same as the ones 
 used on the Add Posting and Read More pages. 
 
<H3>The Show Error page (new for ver. 0.3.0)</H3> 
This is the page that is displayed when there is a validation error during the adding, previewing or editing 
 of the postings. It currently mimics the default Message Dialog display page used by zope when presenting 
 the user with validation errors or confirmation messages. It contains the passed variables from the posting 
 or preview page in hidden fields so that clicking on the OK button will pass them back to the preview posting 
 page. This page can be modified to suit the rest of your 
 website's theme. 
 
<H3>The Show Message page (new for ver. 0.3.0)</H3> 
This is the page that is displayed when there is a confirmation message during the adding, previewing or editing 
 of the postings. Unlike the error page, it does not contain any hidden fields. Otherwise, it is just like the 
 Show Error page. It currently mimics the default Message Dialog display page used by zope when presenting 
 the user with validation errors or confirmation messages. This page can be modified to suit the rest of your 
 website's theme. 
 
<H3>The ValidateArticle and ValidateComment DTML Methods (new for ver. 0.3.0)</H3> 
 These DTML methods are not a displayable pages -- they are functions that are called on to validate an  
 Article or a Comment prior to adding/updating them to the ZODB -- if there is no error, it returns a "_.None"  
 otherwise, they return an error message which is then fed into the ShowError page. This makes the validation 
 process more flexible and customizable for each Squishdot Installation. 
<H3>The Search page</H3> 
The search page is used to search through the articles and comments. It retains the same basic structure 
 as every other page in Squishdot, meaning it uses both the site_header and site_footer documents. It has 
 a main table consisting of two columns, with the leftmost column containing the same information as the 
 leftmost column on the main page. 
<P> 
The other column contains a submission form for searching. It specifies the criteria used for 
 searching. 
<H3>The Search Results page</H3> 
The search results page is very similar to the search page, except that in the middle column, in addition 
 to providing a submission form for searching, it displays a list of articles and comments that satisfied  
 a previous query. 
<H3>the Mail Posting page</H3> 
The mail posting page contains the DTML to format a mail message that is sent when mail notification is 
 enabled. It contains the text of the message so the original poster can readily see what replies have 
 been made to his article or comment. 
%% 
 
 
