====== Definition List Syntax Plugin ====== ---- plugin ---- description: Another (X)HTML definition list. IMHO with better (simpler and smarter) syntax author : Marc Wäckerlin email : marc@waeckerlin.org type : syntax lastupdate : compatible : depends : conflicts : similar : definition, deflist, dl, definitions tags : formatting, list, definitions ---- There are at least two other plugins for definition lists with different syntax and different implementation. Choose which you prefer: [[plugin:definitionlist]], [[plugin:deflist]]. The reason for a new implementation is the following: Simple and good looking syntax, high flexibility. The definition list created with this plugin can be linked by the [[plugin:explain|plugin for explanation of terms]]. ===== Flexibility ===== The definition list is as flexible, as the XHTML definition list (''%%
? Definition Title
Multiple lines are possible
! Definition Description
? Definition Title1
? Definition Title2
! Definition Description1
! Definition Description2
! Definition Description3
? Subdefinition
! Description
! Back
? Again deeper
!Can also start at first line with description only.
Is translated to:
- Definition Title
Multiple lines are possible
- Definition Description
- Definition Title1
- Definition Title2
- Definition Description1
- Definition Description2
- Definition Description3
- Subdefinition
- Description
- Back
- Again deeper
- Can also start at first line with description only.
===== Installation =====
==== The Template's PHP Code ====
To install the functionality, copy the following code into a new file named ''lib/plugins/dl/syntax.php'':
%%'', which is not allowed. Question: **Why?** What can I do to have ''%%
%%'' as parent? --- //Marc// >> Its a restriction on theelement. Strictly that means your plugin should be defined as ''PType="block"'', however block seems flaky. Checkout how the other plugins manage it. If I recall correctly, precede your plugin's markup with ''
'' and finish it with ''''. You should also have a look back at before adding the ''
'' to check for an emptyand if found remove it rather thank writing the closing tag. --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-01-24 02:03// > No, unfortunately that's a solution that inserts a new problem. > 1. I don't want an empty paragraph in front and after. It is the last possibility to get it XHTML compliant, but not a good solution. > 2. Returning ''%%'block'%%'' in function ''%%getPType%%'', resolves the problem of the ''%%
%%'' in front and ''%%
%%'' after, which are both gone, but unfortunately it introduces a new problem: All recognized elements within the ''%%%%'', I suppose in the ''%%$renderer->doc%%'', would work, even though it's a very dirty hack, but it's not a solution for the closing ''%%
%%'', because I can't remove it in advance... --- //Marc// I don't seem to be able to get the multi-line DEFINITION TITLE to work. I copied the sample code, as is, ans multi-line definition title displays on a single line. --- //[[walter@torres.ws|Walter]] 2008-01-11 02:20// It seems that DokuWiki links inside the definition title are not supported, in the definition definition they are. Is this intended or could this be improved? --- //[[sven@meiers.net|Sven]]//