[pmwiki-users] New Receipe ButonLink
Hans
design5 at softflow.co.uk
Sat Jul 5 04:28:55 CDT 2008
Saturday, July 5, 2008, 6:13:53 AM, edwin marte wrote:
> I just added a new receipe Buton Link. The Receipe answers how to Link to a
> page using a gui button and how to to take decisitions base in page actions
> generated with buton choices.
Instead of using a ZAP form for creating tool buttons I would use
standard link markup with images as the link text, like this:
[[{*$FullName}?action=source| Attach:Site/source.gif"source"]]
[[{*$FullName}?action=edit| Attach:Site/edit.gif"edit"]]
etc.
and upload the appropriate tool button images.
If you really need form input buttons as images you can use
(:input image name "source" alt:)
A button form would look like the following, there is no need for a form
processing script, (:input form "{$PageUrl}":) handles it just fine:
(:input form "{$PageUrl}" class=tb:)
(:input hidden action source:)
(:input image button1 "urlpathto/source.gif" source :)
(:input end:)
(:input form "{$PageUrl}" class=tb:)
(:input hidden action edit:)
(:input image button2 "urlpathto/edit.gif" edit :)
(:input end:)
the class=tb is there to make the forms behave as inline elements. It
is defined in pub/css/local.css as
.tb , .tb p { display:inline;}
The url of the images needs to be given, Attach:image.gif does not
work inside the (:input image :) markup
The 'alt' text is important for browsers not displaying images.
In the above standard link example it is provided in double quotes
after the image, i.e. Attach:Site/edit.gif"edit"
~Hans
More information about the pmwiki-users
mailing list