Skip to content

Instantly share code, notes, and snippets.

@hertsch
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hertsch/077bfd17ef08c0f39e3a to your computer and use it in GitHub Desktop.
Save hertsch/077bfd17ef08c0f39e3a to your computer and use it in GitHub Desktop.
Helpfile for the flexContent Glossary Filter function

##~~ filter:Glossary ~~

The filter ~~ filter:Glossary ~~ is part of the flexContent extension for the kitFramework and support the parsing of flexContent Glossary items.

The Glossary filter does not need any parameter or special handling, just place the

~~ filter:Glossary ~~

anywhere in the index.php or any template file (Dwoo, Twig) of the template(s) you are using for your website.

The filter command can be placed anywhere, we propose to place the kitFilter just before the closing </body> tag. The filter command will be removed after parsing, so it does not change your template.

The filter will parse all Glossary terms, prompted by any WYSIWYG, NEWS, Topics add-on or any kitFramework extension like flexContent, miniShop or Event.

## Glossary terms ##

To make use of Glossary terms, create a flexContent Category of type Glossary. Now you can create flexContent items and assign them to a primary category of type Glossary.

For example create a item with the title "Cursor" and the Teaser:

"A cursor is an indicator used to show the position on a computer monitor or other display device that will respond to input from a text input or pointing device."

Now you can reference the keyword "Cursor" in any content (example with HTML code):

<p>Point with the @@cursor@@ to the button.</p>

using the double-at sign @@ at the start and the end of the keyword, term, abbreviation or acronym.

The Glossary filter will parse the Glossary term and change the HTML output to:

<p>Point with the <span class="glossary keyword" title="A cursor is an indicator used to show the position on a computer monitor or other display device that will respond to input from a text input or pointing device.">cursor</span> to the button.</p>

If you define a Redirect to URL in the flexContent item, the generated HTML code will link to this URL.

If a flexContent item is assigned to a category of type Glossary you can also specify the Glossary Type:

  • ACRONYM - create HTML code to indicate an acronym
  • ABBREVIATION - create HTML code to indicate an abbreviation
  • KEYWORD (default) - create HTML code to indicate any other glossary item

See the flexContent documentation for more information about the Glossary function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment