Questions answered by this recipe
- How do I break up long text, to make my page more appealing?
- How do I visually separate elements of my page?
Callouts are separately styled areas of a page, typically used to break up long text, or to visually separate elements of the page. Pm's Cookbook:WikiStylesPlus recipe provides callouts for tips, warnings, and important messages. This recipe gives you more choices.
To install the recipe
- Download the builtincallouts.pngΔ image (which shows all the built-in callouts) and callout.zipΔ (which contains everything else) into the directory containing your pmwiki installation.
- Unpack the callout.zip file.
- Put the callout.php file into your cookbook directory. Put all the other files, including the builtincallouts.png image file, into pub/callout/.
- Add the following line to your local customization file:
How to put a callout on your page
Once you've installed the recipe, you can create any of the built-in callouts with simple markup like this:
>>nutshell<< This text will appear in a nutshell callout. >><<
Or style it with wikistyles:
>>nutshell bgcolor=pink border="1px blue"<< This will have a pink background and blue border... >><<
Most callouts have left and right indentation. You can use this recipe's "fullwidth" style if you don't want indentation. Conversely, if a callout is normally full width, you can indent it with the "lrindent" style.
>>nutshell fullwidth<< This callout will have no indentation... >><<
Showing what callouts are available
You can see what callouts are available on your system by using a callout named "builtincallouts".
Tips and tricks
If your content doesn't quite match any of the built-in callouts, pick a name for the callout that you wish existed, define that name as the callout that currently comes closest, and include that definition in a group or site header that every page includes. On your wiki pages, use your preferred callout name. That will clarify your markup. Also, someday when a more appropriate callout is developed, you'll be able to switch to it globally simply by changing your definition line.
See Cookbook.CalloutCustomization for how to define your own names and styles for callouts using wikistyles, and for examples and instructions on creating entirely new built-in callouts.
This recipe is closely modeled on parts of Pm's WikiStylesPlus recipe.
- 2010-01-02 Initial release.
If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".
See discussion at Callout-Talk