Display article details

In this topic of the tutorial you will create the page that displays details for an article: title, full article content, author etc.

To create this page you must:

Create the advanced recordset

In order to retrieve all article details you must retrieve information from several tables:

To visually build this complex recordset you will use MX Query Builder once more:

  1. Open the article_detail page in Dreamweaver.

  2. Go to the Bindings tab > Plus (+) and select the Recordset (Query) option.

  3. Click the QuB3 button to load the QuB Visual Recordset interface. Configure it as follows:

  4. The MX Query Builder interface is web based and will load in an external browser. Its interface is fully presented here.

  5. To create the query, follow the next steps:

  6. From the Query menu select Save and then Close to return to Dreamweaver.

  7. In Dreamweaver click the Refresh button to load the created query in the SQL textarea, then OK to close the interface and create the recordset:


                     

  8. The recordset and all of the selected columns are displayed in the Bindings tab. Next you will use the recordset fields to create the page.

Display dynamic information

After retrieving the information from the database tables, you must display it on page:

  1. Drag and drop the name_top column from the Bindings tab onto the page. Type ">" (without the quotes) with a trailing and preceding blank space, then drag and drop the title_art column. Select the entire text and from the Format drop-down menu in the Property Inspector select the Heading 3 format.

  2. Create a new paragraph after the article title, and drag and drop the content_art column from the Bindings tab.

  3. On yet another paragraph type: Article submitted by (followed by Space), then drag and drop the email_usr column onto the page. Type on and drag and drop the date_created_art column on the page. This will display the article author and submit date.

  4. Viewed in Dreamweaver, the page looks like:


                      

  5. This concludes the creation of the article detail page. Save the page and close it.

Add page to main layout

Before testing the page you must add it to the main page's Server-Side Includes From List:

  1. Open the index page in Dreamweaver.

  2. Double-click the Server-Side Includes From List server behavior in the Server Behaviors tab to edit it.

  3. Click the Plus (+) button to add a new included file:

  4. Click OK to apply the changes.

 

To test the article_detail page, save the index and press F12 to preview it in the browser. Select one category with articles, and then press the Read more link next to one of the articles:

 

With this page you have completed building the application front-end. Users can browse topics and read articles. Next you have to create the administration section which allows users to create articles (in rich HTML format), assign them for review, and finally approve them.

In the next section of the tutorial you will do just that, using KTML 4 and NeXTensio lists and forms.