cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists

Extensions

This topic is under construction, and may even be deleted. See Tasks.Item2397.

Developer's helper topic. Contains display modules for extension documentation topics.

Usage

Write this at the top of the extension topic:
%INCLUDE{"Extensions" section="intro" warn="If you see this message, you are missing a topic 'Extensions'.<br />To fix this: log in as admin, create a topic [[%SCRIPTURL{edit}%/%SYSTEMWEB%/Extensionx?nowysiwyg=1][Extensions]] and paste in the text of http://foswiki.org/Extensions/Extensions?raw=on. Save the topic and return here."}%

This will retrieve data from a (any) table on the extension topic, and writes the title, description and image at the top of the page.

The image may be a screenshot or a diagram.

Required header labels:
  • Title: - title
  • Description: - introduction text
  • Image file: - file name of large image (do not write the full path)

Example:
<!--
| Title: | Personal Info !AddOn |
| Description: | User personalisation and user search tool. |
| Image file: | userpage.png |
-->

Modules

These are for developers only. You don't need to change anything below.


Display at the top of the extension topic
-----------------------------------------------------------------------------
%STARTSECTION{"intro"}%<h1>%INCLUDE{"%TOPIC%" section="_data" item="Title"}%</h1>
<p class="foswikiLarge" style="margin:1em 0;">%INCLUDE{"%TOPIC%" section="_data" item="Description"}%</strong></p>
%INCLUDE{"%TOPIC%" section="_image"}%%ENDSECTION{"intro"}%

%STARTSECTION{"_data"}%%SEARCH{
"%BASETOPIC%"
nonoise="on"
scope="topic"
format="%INCLUDE{"%TOPIC%" section="_format" item="%item%"}%"
}%%ENDSECTION{"_data"}%

Search format regex pattern
-----------------------------------------------------------------------------
%STARTSECTION{"_format"}%$pattern(.*\| *%item%\:[^\|]*\|\s*([^\|]*).*)%ENDSECTION{"_format"}%

Image at the top of the extension topic
-----------------------------------------------------------------------------
%STARTSECTION{"_image"}%<div class='foswikiImage'><img src='%PUBURLPATH%/%BASEWEB%/%BASETOPIC%/%INCLUDE{"%TOPIC%" section="_data" item="Image file"}%' alt='Extension image' /></div>%ENDSECTION{"_image"}%

Topic revision: r2 - 20 Dec 2009, ArthurClemens - This page was cached on 24 Sep 2018 - 06:38.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy