Index
A content module managing devhelp2 hierarchies
This is a stripped down rewrite of TIP_Hierarchy that sets a default data engine capable to directly manage .devhelp2 files, the common format generated by gtk-doc.
To be able to use this module, it suffices to configure a devhelp2 module and feed it with the .devhelp2 file:
$cfg = array(
...
'api' => array(
'type' => array('module', 'content', 'devhelp2'),
'data' => 'api/adg.devhelp2'
),
...
);
After that, the template system can use the hierarcy generated by the "show" tag in the same way the TIP_Hierarchy module is used, for instance (using the TIP_RcbtNG engine):
<ul class="article">{API.show(view,-id-)}
</ul>
The actionView() method is overriden so that, on a view request, the corresponding html file (searched in the data directory of the current module) is output "as is" in the page content. This means a previous stripping step is required in order to directly use the file generated by gtk-doc: a simple xslt transformation that removes everything unneeded will be enough.
For more customizations, the "view_template" is still available, although disabled if not explicitely set in the configuration. In this case, the 'id' and 'content' keys are generated with the proper content and the "title_field", "creation_field" and "edited_field" are honored. This means if the magic fields are left to their default values, the following (virtual) fields are available to the template engine:
{content}
returned by the filectime() function
as returned by the filemtime() function
Constructor
Initializes a TIP_Devhelp2 instance.
Echo the hierarchy
Overrides the default tagShow() to disable the page indexing if the current selected row is a container. In $params you can specify the custom action to use: if left empty, the default action (configured for this module) will be used.
Perform a view action
Runs the file identified by the 'view_template' property for the specified row. The rendered result is appended to the page.
TIP_Devhelp2was last modified by TiP on Mon 25 May 2009 06:22:25 PM CEST