Creating a wiki format with Flexifilter

Last updated on
30 April 2025

You are browsing documentation for an older version of Drupal, which is not supported any longer, and the information may not be correct. See current documentation for Contributed modules

Flexifilter currently ships with a wiki format, but let's step through it so you can understand how it works.

  1. Go to the flexifilter administration area by clicking Administer -> Site Building -> Flexifilters, and click 'Add new flexifilter'.
  2. Set the label to 'Wiki'.
  3. Set the description to 'A flexifilter for a wiki'.
  4. Prepend with </nowiki>.
  5. Append with <nowiki>
  6. Do a chunk grab on </nowiki> and <nowiki>.
  7. Add several pattern-based text replace components:
  8. Replace ''' (three single dashes) with alternating <strong> and </strong>.
  9. Replace '' (two single dashes) with alternating <em> and </em>.
  10. Replace ==== (four equals signs) with alternating <h4> and </h4>
  11. Replace === (three equals signs) with alternating <h3> and </h3>
  12. Replace == (two equals signs) with alternating <h2> and </h2>
  13. Create a chunk grabber on [[ and ]].
  14. Add an IF component within the chunk grabber.
  15. Add the condition "text contains" with the parameter |.
  16. As subcomponents of this IF statement, prepend with <a href="/drupalwikipath/
  17. String replace | with ">.
  18. Append </a>.
  19. Now, outside the if statement, create an IF NOT statement with the same condition.
  20. String replace ~ with \~ (escape the character).
  21. Append ~~.
  22. Add an advanced append. Step 20 should be added to this component.
  23. String replace ~~ with </a>.
  24. Now, outside of the advanced append, prepend with <a href="/drupalwikipath/
  25. String replace ~~ with ">
  26. String replace \~ with ~.

Help improve this page

Page status: Not set

You can: