Previous | Next
WireHose Developers Guide

Customizing the main page

We'll create a different appearance for the main page depending on whether the user is a guest or not. The page guest users see will be dominated by a Yahoo-style collection of categories, while the page registered users see will be dominated by their selected topics of interest.

  1. Open MainPage.wo in WebObjects Builder.
  2. Select the WHTagDriller component, and add a WOConditional around it. Set its condition to helper.user.isGuest
  3. Add another WOConditional. Set its condition to helper.user.isGuest and set its negate to true
  4. Inside the conditional, add a new table with 1 row, 2 columns, 0 border 6 spacing and 0 padding. Uncheck both "First row cells are header cells (<TH>)" and "Second row is wrapped in a WORepetition" and click OK.
  5. Select the left cell, and choose Custom WebObject from the WebObjects menu. For "WebObjects class to use:" type WHArea, and click OK. Set its areaName to "main"

    Note: The WHArea component iterates over the user's channels which have been mapped to its areaName value, and renders each with a WHSwitchRenderer. Hello World's layout has just one area, named "main".

  6. Select the right cell, and choose Custom WebObject from the WebObjects menu. For "WebObjects class to use:" type WHTagDriller, and click OK.
  7. Set its maxChildTags to 0, numCols to 1 and its tagPath to "Content"

  8. If you haven't logged in yet, login, or just reload the page in your browser.


Previous | Next