[Pmwiki-users] 'Advanced' Markups

Ciaran ciaranj
Sat Jul 24 02:43:13 CDT 2004


Hi,
My knowledgebase-ontopof-FTS is now looking pretty snazzy and can
pretty effectively render a table of intformation for all the pages in
a given Group (assuming they're all attached to an FTS template..
Which is nice and I think will be a great addition to PmWiki's
functionality.  I know I've several uses for it anyway :)

*However* I need/want to have some fairly complex markup, at the
minute a Wiki editor only has to use [[$Knowledge]] to cause the table
to render.  Which is fine and very simple and I will probably leav
this basic syntax in to render *every* field in the form.

However I only want to render select fields to the table so in the
code I can specify a relationship between a visible title, say '
Address' and a form field say 'user_address' .  I want to be able to
specify this in the wiki markup.  Ideally I want to be able to  do
even more that just that, I'd *love* to be able to provide a
relationship between 'Title', 'form field' and 'optional code to run'
.  Where the code can replace the value stored in the field
arbirtarily, for example replacing the value 'yes' with an
Attach:tick.gif.  This would be awesomely powerful, but should remain
optional.

The markup I have in mind is as follows:
[[$Knowledge columns='Title Text:form_field:Some_Method(), Another
Title:another_form_field' id='foo']]

within the columns field there can be multiple Title/form
field/[optional method name] pairs/triplets.  the id column is for
stylesheets so a system running multiple knowledgebase style tables
(FAQs etc) can have different independant styles applied

*Any* ideas as to whether this is a) possible, b) reasonable syntax
and c)  How in the hell would I write a reg-ex to do this :( [I'm just
an innocent Java programmer!)  MY Current regex is :

SDV($InlineReplacements['/\\[\\[\\$Knowledge\\]\\]/e'], "KBase()");

Which seems to work in the basic sense I need it to currently .

(System demonstration can be found at
http://www.wombatinvasion.com/pmwiki/pmwiki.php/Knowledge/HomePage )

All help gladly appreciated.
-- 
- Ciaran
http://www.wombatinvasion.com/ (Share the love)



More information about the pmwiki-users mailing list