phpDocumentor
[ class tree: phpDocumentor ] [ index: phpDocumentor ] [ all elements ]
Prev Next

inline {@toc}

Display a table of contents of all {@id}s declared in a file

by Gregory Beaver
Tag Documentation written by cellog@php.net
Copyright 2002, Gregory Beaver
(phpDocumentor 1.2+)
{@toc}

Description

The inline {@toc} tag is used as a sub-element of the <refentry> tag to display a table of contents of the current tutorial. This table of contents is generated directly by a call to Converter::formatTutorialTOC().

Example

This sample tutorial:

  1. <refentry id="{@id}">
  2.  <refnamediv>
  3.   <refname>{@}tocexample</refname>
  4.   <refpurpose>Uses {@}tocto generate a table of contents</refpurpose>
  5.  </refnamediv>
  6.  {@toc}
  7.  <refsect1 id="{@id one}">
  8.   <title>First section</title>
  9.  </refsect1>
  10.  <refsect1 id="{@id two}">
  11.   <title>Second section</title>
  12.   <refsect2 id="{@id sub}">
  13.    <title>Sub-section</title>
  14.   </refsect2>
  15.  </refsect1>
  16.  <refsect1 id="{@id three}">
  17.   <title>Third section</title>
  18.  </refsect1>
  19. </refentry>

Will parse as if it were

  1. <refentry id="{@id}">
  2.  <refnamediv>
  3.   <refname>{@}tocexample</refname>
  4.   <refpurpose>Uses {@}tocto generate a table of contents</refpurpose>
  5.  </refnamediv>
  6.  
  7.  <refsect1>
  8.   <itemizedlist>
  9.    <listitem><para>{@tutorial mytutorial#one}</para></listitem>
  10.    <listitem><para>{@tutorial mytutorial#two}
  11.     <itemizedlist>
  12.      <listitem><para>{@tutorial mytutorial#two.sub}</para></listitem>
  13.     </itemizedlist>
  14.    </para></listitem>
  15.    <listitem><para>{@tutorial mytutorial#three}</para></listitem>
  16.  </refsect1>
  17.  
  18.  <refsect1 id="{@id one}">
  19.   <title>First section</title>
  20.  </refsect1>
  21.  <refsect1 id="{@id two}">
  22.   <title>Second section</title>
  23.   <refsect2 id="{@id sub}">
  24.    <title>Sub-section</title>
  25.   </refsect2>
  26.  </refsect1>
  27.  <refsect1 id="{@id three}">
  28.   <title>Third section</title>
  29.  </refsect1>
  30. </refentry>

The format of the table of contents is Converter-dependent, and for the converters supplied with phpDocumentor, can be set up through the use of tutorial_toc.tpl in the template for tremendous customization control
Prev Up Next
inline {@source} phpDocumentor Inline tags inline {@tutorial}

Documentation generated on Mon, 11 Mar 2019 15:50:07 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.