Graph Magic Includes

Here is the place that the deep magic occurs. The includable page sections (ie, INCLUDEs) below make the actual TWiki pages featureful, yet keep them short and tidy. Currently, there are three types of INCLUDEs:

  • All A's of This B - Show all pages of type A that are related to this (type B) page. (These reside on the GmIncludesAB page.)

  • All A's in This Web - Show all pages of type A that are located in this TWiki web. (These reside on the GmIncludesAW page.)

  • Wrappers - Package up a set of TWiki markup for a particular purpose and/or page type. (These reside on this page.)

These INCLUDEs are used by individual edge, node, or view pages. They package up a set of TWiki markup for a particular purpose and/or page type. Currently, there are two types of wrappers:

  • Headers

    Generate header boilerplate for the current page. This includes the page title and table of contents, plus the stub of a Discussion section (based on the page's Precis and Summary fields).

  • Navigation Aids

    Generate navigation boilerplate for the current page. Invoke the appropriate "All A's of This B" INCLUDEs. For View pages, provide a clickable context diagram.

  • Tools

    Generate links to assorted Graph Magic tool pages; wrap subsidiary INCLUDEs, for flexibility.

Credits: Vicki Brown wrote most of the initial code for Graph Magic. Rich Morin then copied, pasted, edited, debugged the results, and occasionally whined for help.

Headers

Edge Page Header (edge_page_hdr)

Description:

Generate header boilerplate for an Edge page.

Code:

%STARTSECTION{"edge_page_hdr"}%
<noautolink>

---+!!  %FORMFIELD{"EdgeTitle" topic="%INCLUDINGTOPIC%"}%
 
%TOC{depth="3"}%

---+++ Discussion

<b>Summary:</b>
%FORMFIELD{"EdgeSummary" topic="%INCLUDINGTOPIC%"}%

%FORMFIELD{"EdgePrecis" topic="%INCLUDINGTOPIC%"}%
%ENDSECTION{"edge_page_hdr"}%

Node Page Header (node_page_hdr)

Description:

Generate header boilerplate for a Node page.

Code:

%STARTSECTION{"node_page_hdr"}%
<noautolink>

---+!!  %FORMFIELD{"NodeTitle" topic="%INCLUDINGTOPIC%"}%
 
%TOC{depth="3"}%

---+++ Discussion

<b>Summary:</b>
%FORMFIELD{"NodeSummary" topic="%INCLUDINGTOPIC%"}%

%FORMFIELD{"NodePrecis" topic="%INCLUDINGTOPIC%"}%
%ENDSECTION{"node_page_hdr"}%

View Page Header (view_page_hdr)

Description:

Generate header boilerplate for a View page.

Code:

%STARTSECTION{"view_page_hdr"}%
<noautolink>

---+!!  %FORMFIELD{"ViewTitle" topic="%INCLUDINGTOPIC%"}%
 
%TOC{depth="3"}%

---+++ Discussion

<b>Summary:</b>
%FORMFIELD{"ViewSummary" topic="%INCLUDINGTOPIC%"}%

%FORMFIELD{"ViewPrecis" topic="%INCLUDINGTOPIC%"}%
%ENDSECTION{"view_page_hdr"}%

Edge Page Navigation (edge_page_nav)

Description:

Generate navigation boilerplate for a Edge page.

Code:

%STARTSECTION{"edge_page_nav"}%
---+++ Context and Navigation

%INCLUDE{"GmIncludes" section="nav_help_text"}%

%TWISTY{
   showlink="Show Related Activities &nbsp;&nbsp;"
   hidelink="Hide Related Activities &nbsp;&nbsp;"
   showimgright="%ICONURLPATH{toggleopen-small}%"
   hideimgright="%ICONURLPATH{toggleclose-small}%"
}%
<ul>%INCLUDE{"GmIncludesAB" the_topic="%INCLUDINGTOPIC%" section="views_of_edge"}%</ul>
%ENDTWISTY%

%TWISTY{
   showlink="Show Related Components &nbsp;&nbsp;"
   hidelink="Hide Related Components &nbsp;&nbsp;"
   showimgright="%ICONURLPATH{toggleopen-small}%"
   hideimgright="%ICONURLPATH{toggleclose-small}%"
}%
<ul>%INCLUDE{"GmIncludesAB" the_topic="%INCLUDINGTOPIC%" section="nodes_of_edge"}%</ul>
%ENDTWISTY%

%ENDSECTION{"edge_page_nav"}%

Node Page Navigation (node_page_nav)

Description:

Generate navigation boilerplate for a Node page.

Code:

%STARTSECTION{"node_page_nav"}%
---+++ Context and Navigation

%INCLUDE{"GmIncludes" section="nav_help_text"}%

%TWISTY{
   showlink="Show Related Activities &nbsp;&nbsp;"
   hidelink="Hide Related Activities &nbsp;&nbsp;"
   showimgright="%ICONURLPATH{toggleopen-small}%"
   hideimgright="%ICONURLPATH{toggleclose-small}%"
}%
<ul>%INCLUDE{"GmIncludesAB" the_topic="%INCLUDINGTOPIC%" section="views_of_node"}%</ul>
%ENDTWISTY%

%TWISTY{
   showlink="Show Related Interactions &nbsp;&nbsp;"
   hidelink="Hide Related Interactions &nbsp;&nbsp;"
   showimgright="%ICONURLPATH{toggleopen-small}%"
   hideimgright="%ICONURLPATH{toggleclose-small}%"
}%
<ul>%INCLUDE{"GmIncludesAB" the_topic="%INCLUDINGTOPIC%" section="edges_of_node"}%</ul>
%ENDTWISTY%

%ENDSECTION{"node_page_nav"}%

View Page Navigation (view_page_nav)

Description:

Generate navigation boilerplate for a View page.

Code:

%STARTSECTION{"view_page_nav"}%
---+++ Context and Navigation

%INCLUDE{"GmIncludes" section="nav_help_text"}%

<!--
T: view_page_nav:<br>
T: &nbsp;&nbsp; INCLUDINGTOPIC: '%INCLUDINGTOPIC%'<br>
-->

%TWISTY{
   showlink="Show Context Diagram &nbsp;&nbsp;"
   hidelink="Hide Context Diagram &nbsp;&nbsp;"
   showimgright="%ICONURLPATH{toggleopen-small}%"
   hideimgright="%ICONURLPATH{toggleclose-small}%"
}%
<ul>%INCLUDE{"GmImages"   the_topic="%INCLUDINGTOPIC%" section="%INCLUDINGTOPIC%"}%</ul>
%ENDTWISTY%

%TWISTY{
   showlink="Show Related Components &nbsp;&nbsp;"
   hidelink="Hide Related Components &nbsp;&nbsp;"
   showimgright="%ICONURLPATH{toggleopen-small}%"
   hideimgright="%ICONURLPATH{toggleclose-small}%"
}%
<ul>%INCLUDE{"GmIncludesAB" the_topic="%INCLUDINGTOPIC%" section="nodes_of_view"}%</ul>
%ENDTWISTY%

%TWISTY{
   showlink="Show Related Interactions &nbsp;&nbsp;"
   hidelink="Hide Related Interactions &nbsp;&nbsp;"
   showimgright="%ICONURLPATH{toggleopen-small}%"
   hideimgright="%ICONURLPATH{toggleclose-small}%"
}%
<ul>%INCLUDE{"GmIncludesAB" the_topic="%INCLUDINGTOPIC%" section="edges_of_view"}%</ul>
%ENDTWISTY%

%ENDSECTION{"view_page_nav"}%

Tools

Index Wrappers (*_in_web)

Description:

Wrap subsidiary INCLUDEs, for flexibility.

Code:

%STARTSECTION{"edges_of_web"}%
%INCLUDE{"GmIncludesAW" section="edges_of_web"}%
%ENDSECTION{"edges_of_web"}%

%STARTSECTION{"nodes_of_web"}%
%INCLUDE{"GmIncludesAW" section="nodes_of_web"}%
%ENDSECTION{"nodes_of_web"}%

%STARTSECTION{"views_of_web"}%
%INCLUDE{"GmIncludesAW" section="views_of_web"}%
%ENDSECTION{"views_of_web"}%

Description:

Generate navigation help text.

Code:

%STARTSECTION{"nav_help_text"}%

%TWISTY{
   showlink="Show Help Text"
   hidelink="Hide Help Text"
}%
<ul><p>
The content of this section is automatically generated,
based on TWiki form data stored in the pages of this web.
See [[GmIntro]] for more information.

Each "disclosure triangle" below indicates the display state of its content
(ie, hidden <img src="%ICONURLPATH{toggleopen-small}%" /> or
     shown  <img src="%ICONURLPATH{toggleclose-small}%" />).
Click the triangle to toggle the display state.
</ul>
%ENDTWISTY%

%ENDSECTION{"nav_help_text"}%

Description:

Generate links to assorted Graph Magic tool pages.

Code:

%STARTSECTION{"tool_pages"}%
---++ Graph Magic Tools

<table>
  <tr>
    <td width=20></td>
    <th width=110>Create page</th>
    <td width=40>[[EdgeCreate][Edge]]</td>
    <td width=40>[[NodeCreate][Node]]</td>
    <td width=40>[[ViewCreate][View]]</td></tr>
  <tr>
    <td></td>
    <th>Define name</th>
    <td></td>
    <td>[[NodeNames][Node]]</td>
    <td>[[ViewNames][View]]</td> </tr>
  <tr>
    <td></td>
    <th>Edit form</th>
    <td>[[EdgeForm][Edge]]</td>
    <td>[[NodeForm][Node]]</td>
    <td>[[ViewForm][View]]</td></tr>
  <tr>
    <td></td>
    <th>Edit template</th>
    <td>[[EdgeTemplate][Edge]]</td>
    <td>[[NodeTemplate][Node]]</td>
    <td>[[ViewTemplate][View]]</td></tr>
  <tr>
    <td></td>
    <th>Find page</th>
    <td>[[EdgeIndex][Edge]]</td>
    <td>[[NodeIndex][Node]]</td>
    <td>[[ViewIndex][View]]</td></tr>
</table>

%ENDSECTION{"tool_pages"}%


This wiki page is maintained by Rich Morin, an independent consultant specializing in software design, development, and documentation. Please feel free to email comments, inquiries, suggestions, etc!

Topic revision: r42 - 19 Aug 2008, RichMorin

Available Webs


This site is powered by Foswiki Copyright © by the contributing authors. All material on this wiki is the property of the contributing authors.
Foswiki version v2.1.6, Release Foswiki-2.1.6, Plugin API version 2.4
Ideas, requests, problems regarding CFCL Wiki? Send us email