[Prev: TTITLE] | [Resources][TOC] | [Next: TTOPBUTTON]

# TTOPBEGIN

- Syntax
- Description
- Default Setting
- Resource Variables
- Examples
- Version
- See Also

## Syntax

Envariable

  N/A

Element

  `<TTOPBEGIN>
  ` markup ...
  `</TTOPBEGIN>
  `

Command-line Option

  N/A

## Description

TTOPBEGIN defines the markup for the root, or start, of a thread. TTOPBEGIN should define any starting markup for the thread and markup for the root message of the thread.

## Default Setting

    <TTopBegin>
    <li><strong>$SUBJECT$</strong>,
    <em>$FROMNAME$</em>
    </TTopBegin>

## Resource Variables

Variable | Value
--- | ---
`$A_ATTR$` | The `NAME` and `HREF` attributes to use in an anchor to link to the archived message. The `NAME` attribute links the messages to the index page.
`$A_HREF$` | The `HREF` attribute to use in an anchor to link to the archived message.
`$A_NAME$` | The `NAME` attribute to use in an anchor for messages to link to the index page.
`$DATE$` | The date of the message.
`$DDMMYYYY$` | Message date in dd/mm/yyyy format.
`$ENV$` | Value of an environment variable.
`$FROM$` | The complete text in the `From:` field of the message.
`$FROMADDR$` | The e-mail address in the `From:` field of the message.
`$FROMADDRDOMAIN$` | The e-mail address domain of the `From:` field of the message.
`$FROMADDRNAME$` | The e-mail address "username" (or local-part) of the `From:` field of the message.
`$FROMNAME$` | The human name of the person in the `From:` field of the message. If no human name is found, the username specified in the e-mail address is used.
`$ICON$` | The content-type sensitive icon.
`$ICONURL$` | URL to the content-type sensitive icon.
`$ICONURLPREFIX$` | Value of ICONURLPREFIX resource.
`$MMDDYYYY$` | Message date in mm/dd/yyyy format.
`$MSGGMTDATE$` | GMT date of current message.
`$MSGHFIELD$` | Message header field
`$MSGID$` | The message-id of the message.
`$MSGLOCALDATE$` | Local date of current message.
`$MSGNUM$` | The message number assigned to the message by MHonArc (includes leading zeros).
`$MSGPREFIX$` | Filename prefix for message files.
`$MSGTORDNUM$` | The ordinal message number of the current discussion thread.
`$NOTE$` | Message annotation.
`$NUMFOLUP$` | Number of explicit follow-ups to the message.
`$ORDNUM$` | The current listing number of the message.
`$SUBJECT$` | The subject text of the message, and if no arguments, wrapped in an anchor element that hyperlinks to the message.
`$SUBJECTNA$` | The subject text of the message without the anchor element.
`$TLEVEL$` | Numeric level of message in thread, starting with 0.
`$YYYYMMDD$` | Message date in yyyy/mm/dd format.

## Examples

MHonArc has several resources for customizing thread page layout. Therefore the following shows a way to customize the layout using the various thread resource available.

For this example, The thread index is setup where a thread will have the subject in bold at the top of the thread and the names of the authors of the messages in the thread will be hyperlinked to the actual message. Nested unordered lists are used to provide a visual cue of the depths of the thread. Unique messages are show in normal text.

    <!--    TTOPBEGIN is the markup for the beginning of a thread, and the
            first message in a thread.
      -->
    <TTOPBEGIN>
    <p>
    <li><a $A_NAME$><strong>$SUBJECTNA$</strong></a><br>
    <a $A_HREF$>$FROMNAME$</a>
    </TTOPBEGIN>

    <!--    TTOPEND is the markup for closing a main thread.
      -->
    <TTOPEND>
    </li>
    </p>
    </TTOPEND>

    <!--    TLITXT is the markup for a message *within* a thread
      -->
    <TLITXT>
    <li><a $A_ATTR$>$FROMNAME$</a>
    </TLITXT>

    <TLIEND>
    </li>
    </TLIEND>

    <!--    TSINGLETXT is the markup for a message not in a thread.  I.e.
            it does not start a thread or is part of a thread.
      -->
    <TSINGLETXT>
    <li><a $A_NAME$>$SUBJECTNA$</a>,
    <a $A_HREF$>$FROMNAME$</a>
    </li>
    </TSINGLETXT>

    <!--    TSUBJECTBEG is any markup at the beginning of a sub-thread that
            is based on the subject of the message.  We just put in a
    	comment declaration so the reader will see nothing.
      -->
    <TSUBJECTBEG>
    <!-- Possible follow-ups -->
    </TSUBJECTBEG>

An item to note is how the example includes the proper resource variables, `$A_NAME$` and `$A_ATTR$`, to allow the index hyperlinks in messages to behave properly.

## Version

2.0

## See Also

TLITXT, TSINGLETXT, TSUBJECTBEG, TTOPEND

Page Layout

[Prev: TTITLE] | [Resources][TOC] | [Next: TTOPBUTTON]