|
Cookbook /
FoxDeleteSummary: add delete links for deleting lines or sections with Fox
Version: 2008-07-12
Prerequisites: Pmwiki 2.2.0 beta
Status: beta
Maintainer: HansB
Download:foxdelete.phpΔ
Questions answered by this recipeHow can I add delete links or buttons with which to delete lines or sections? DescriptionAn add-on for the Fox form processor which enables line or section delete links and buttons. Install in the usual manner by copying to cookbook/ or cookbook/fox/ folder and including in local config file as
or
This script adds template markup Note that the markup is for fox templates only! The delete link or button form gets created via a Fox posting. Thereby Fox adds an id number to the link and button, which makes it possible to target the line or section for
deletion in which the link or button is situated. Sections are marked by using ExamplesThe following will add a line of input text with a foxdelete (line) link for line deletion above the foxappend marker, thereby following additions are added below previous ones (use
(:fox frm1 :)
(:foxtemplate "* {$$comment} {[foxdelline]}":)
(:input text comment size=50:)
(:input submit post 'Add Comment':)
(:foxend frm1:)
(:foxappend frm1:)
The following will add a section of text to the page, with a foxdelete (range) link for deleting the whole section:
(:fox frm2 template=commenttmpl:)
(:input textarea comment rows=6 cols=50:)
(:input submit post 'Add Comment':)
(:foxend frm2:)
(:if false:)
[[#commenttmpl]]
#foxbegin#
----
%rfloat%{[foxdelrange]}
{$$comment}
#foxend#
[[#commenttmplend]]
(:if:)
Note the template uses #foxbegin# and #foxend# markers for identifying the delete range. NotesThe foxdelete markup and action handling function was previously included in fox.php. Release Notes
See AlsoContributorsComments |