Child pages
  • Development-Examples-Page Layout
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Here is a trivial example of a page layout WOComponentContent:

{panel}
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  <html>
    <head>
         <title>
        <webobject name = "Title"></webobject>
      </title>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
      <webobject name = "Stylesheet"></webobject>
    </head>
  
    <webobject name = "Body">
      <webobject name = "Form">
        <webobject name = "Table">
          <tr>
            <td align = "left" valign = "top" colspan = "3">
              <webobject name = "Header"></webobject>
            </td>
          </tr>
          <tr>
            <td align = "left" valign = "top" colspan = "3">
              &nbsp;
            </td>
          </tr>
          <tr>
            <td align = "left" valign = "top" class = "Margin">
              &nbsp;
            </td>
            <td align = "left" valign = "top">
              <webobject name = "Content"></webobject>
            </td>
            <td align = "left" valign = "top" class = "Margin">
              &nbsp;
            </td>
          </tr>
          <tr>
            <td align = "left" valign = "top" colspan = "3">
              &nbsp;
            </td>
          </tr>
          <tr>
            <td align = "left" valign = "top" colspan = "3">
              <webobject name = "Footer"></webobject>
            </td>
          </tr>
        </webobject>
      </webobject>
    </webobject>
  </html>
{panel}

And the wod:

Title: WOString

Unknown macro: { value = title; }

;

Stylesheet: Stylesheet
{
};

Body: WOBody
{
};

Table: WOGenericContainer

Unknown macro: { elementName = "table"; border = "0"; cellSpacing = "0"; cellPadding = "0"; class = "FullWidth"; }

;

Form: WOForm

Unknown macro: { multipleSubmit = true; }

;

Header: Header

Unknown macro: { title = ^title; page = ^page; pathComponents = ^pathComponents; }

;

Footer: Footer
{
};

Content: WOComponentContent
{
};

To use this layout, you could do the following in one of your pages:

{panel}
  <webobject name = "PageLayout">
    <webobject name = "Table">
      <tr>
        <td align = "left" valign = "top">
          <webobject name = "Envelopes"></webobject>&nbsp;
        </td>
        <td align = "left" valign = "top" class = "Margin">
          &nbsp;
        </td>
        <td align = "left" valign = "top" class = "FixColumn">
          <webobject name = "Table">
            <tr>
              <td align = "left" valign = "top">
                <webobject name = "ThreadList"></webobject>
              </td>
            </tr>
            <tr>
              <td align = "left" valign = "top">
                <webobject name = "DocumentList"></webobject>
              </td>
            </tr>
            <tr>
              <td align = "left" valign = "top">
                <webobject name = "LinkList"></webobject>
              </td>
            </tr>
            <tr>
              <td align = "left" valign = "top">
                <webobject name = "RelatedList"></webobject>
              </td>
            </tr>
          </webobject>
        </td>
      </tr>
    </webobject>
  </webobject>
{panel}

wod file:

PageLayout: PageLayout

Unknown macro: { title = title; page = name; pathComponents = pathComponents; }

;

Name: SpanString

Unknown macro: { value = value; isBig = true; isBold = true; }

;

Table: WOGenericContainer

Unknown macro: { elementName = "table"; border = "0"; cellSpacing = "0"; cellPadding = "0"; class = "FullWidth"; }

;

Envelopes: Table

Unknown macro: { list = envelopes; keysDescription = "self|recipientNames.iterator.next|sentDate"; headersDescription = "Subject|Recipient|Date"; }

;

ThreadList: List

Unknown macro: { title = "Thread"; list = threads; minimumSize = 0; //maximumSize = 20; }

;

DocumentList: List

Unknown macro: { title = "Attachment"; list = documents; minimumSize = 0; //maximumSize = 20; }

;

LinkList: List

Unknown macro: { title = "Link"; list = links; minimumSize = 0; //maximumSize = 20; }

;

ListList: List

Unknown macro: { title = "List"; list = lists; minimumSize = 0; }

;

RelatedList: List

Unknown macro: { title = "Other"; list = value.relatedNames; minimumSize = 0; }

;

Category:WebObjects

  • No labels