[pmwiki-users] Custom bullets in lists

Ben Wilson dausha at gmail.com
Thu May 25 18:14:42 CDT 2006


You could also create an additional CSS file with a specific style. I
do this for ordered list items. I have an "outline.css" that allows me
to have the various list levels show appropriate "numbering" for
ordered lists. To activate, I just start the section with >>outline<<

This same approach can be used for unordered lists.

On 5/25/06, Roman <romat2 at gmail.com> wrote:
> Nice, but it requires to define style for each image. If Pm could
> extend Wikistyles to use attachment or intermap link in image url(),
> then we could use any image without the need to define style for it.
> But I don't know how hard is it to implement.
>
> This already works today:
> * %list list-style=square% item 1
> * item 2
> * %item list-style=circle% item 3
>
> but here the image is rendered before its path is used in style:
> * %list list-style=url(Attach:pdf.png)% item 1
> * item 2
> * %item list-style=url(Intermap:pdf.png)% item 3
>
> Custom images work with hardcoded path, but it's not good, of course.
> * %item list-style=url([=http://server/path//to/image/pdf.png=])% item 3
>
> On 3/25/06, Anno <anno at shroomery.org> wrote:
> > I figured it out:
> >
> > 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 ul behavior 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:
> >
> > *%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:
> > http://img154.imageshack.us/img154/3896/bullets8vq.png
> >
> > Anno
> >
> >
> >
> > _______________________________________________
> > pmwiki-users mailing list
> > pmwiki-users at pmichaud.com
> > http://host.pmichaud.com/mailman/listinfo/pmwiki-users
> >
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
>


-- 
Ben Wilson
" Mundus vult decipi, ergo decipiatur"




More information about the pmwiki-users mailing list