[pmwiki-users] Importing Categories from a file

Josh Miller josh at virtualmillers.net
Sun Feb 4 01:17:41 CST 2007


I have a line in my config that looks like this:

$GUIButtons ['cat'] = array(535, '', '', '',"<select name=category
id=category onChange='InsertCategory()'><option>Select
Category</option><option value=Category1>Category1</option><option

It inserts a dropdown box with category names in it when I edit a page.

I would like to be able to put the categories in a wiki file like
Site.Categories that would contain all of the available categories (one per
line) and then replace <option value=Category1>Category1</option><option
value=Category2>Category2</option> in the statement above with each of the
categories read in from this page...

So my Site.Categories page could look like this:

This would be read in from the wiki file and converted to:
<option value=fish>fish</option><option value=Milk>Milk</option><option

Then I would need to be able to replace the above statement in the GuiButton
Dropdown box.

Any ideas how I would go about doing this?


Gouverneur  NY

More information about the pmwiki-users mailing list