Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

CustomBullets

Summary: Enable custom bullets to distinguish document types
Version: 1.0
Prerequisites: none
Status:
Maintainer: Anno
Categories: Images, Uploads

Description

This recipe enables custom bullets in a list as shown on this page: http://www.macworld.com/2005/12/secrets/januarycreate/index1.php

First we enable the handling of the following css properties by adding this to config.php file:

$WikiStyleCSS[] = 'background';
$WikiStyleCSS[] = 'list-style-type';
$WikiStyleCSS[] = 'padding-left';

Then we disable the default list bullets by adding this to the config.php file:

$WikiStyle['cl']['apply'] = 'list';
$WikiStyle['cl']['list-style-type'] = 'none';
$WikiStyle['cl']['padding-left'] = '0px';
$WikiStyle['cl']['margin-left'] = '0px';

This defines the markup %cl% ("custom list") which we have to include in our customized list later.

Then define the custom bullets, in this case a word and a pdf one(define as many you want):

$WikiStyle['pdf']['apply'] = 'item';
$WikiStyle['pdf']['background'] = 'url('.$PubDirUrl.'/bullets/pdf.png) 
left center no-repeat';
$WikiStyle['pdf']['padding-left'] = '20px';
$WikiStyle['pdf']['margin-bottom'] = '5px';

$WikiStyle['word']['apply'] = 'item';
$WikiStyle['word']['background'] = 'url('.$PubDirUrl.'/bullets/word.png) 
left center no-repeat';
$WikiStyle['word']['padding-left'] = '20px';
$WikiStyle['word']['margin-bottom'] = '5px';

Place the proper bullet images (pdf.png, word.png) into the /pub/bullets/ directory.

Bullets are available here:
http://www.stylegala.com/features/bulletmadness/

Finaly, we can now write in our documents:

* %cl% %pdf% This is the pdf document #1
* %word% This is the word document #1
* %pdf% This is the pdf document #2
* %word% This is  the word document #2

Resulting in this list:

Notes

Release Notes

Initial release: 2006-03-25

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".

Comments

See Also

  • AttachIcons Add icon images to Attach file links according to file extension
  • Link icons Add icons to your links

Contributors

User notes?: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date
* (-) Optional negative comment. Name, date

These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.

Edit - History - Print - Recent Changes - Search
Page last modified on August 24, 2009, at 06:46 PM