[pmwiki-users] Input Select To Trigger Go To Page
The Editor
editor at fast.st
Wed May 9 06:59:13 CDT 2007
On your page just put:
(:input form:)
(:pagelist group={$Group} name=-RecentChanges fmt="#jumpbox":)
(:input end:)
Use this for your pagelist template
[[#jumpbox]]
(:template first:)
(:input jumpbox value='' label='Jump to page...':)
(:template each:)
(:input jumpbox value="{=$PageUrl}" label="{=$Title}":)
[[#jumpboxend]]
You will need to put the following code into your config file for the
latter to work:
$FmtPV['$_UniqId_'] = '($GLOBALS["_UniqId_"] = uniqid("id"))';
$FmtPV['$_PrevId_'] = '$GLOBALS["_UniqId_"]';
$InputTags['jumpbox'] = array(
'name' => 'n',
':html' =>
"<form action='{$PageUrl}' method='get'>
<select onchange='window.location.href=this.options[this.selectedIndex].value'
\$InputSelectArgs class='inputbox' >\$InputSelectOptions</select>
<input id='{\$_UniqId_}' type='submit' value='$[Jump to page]'
class='inputbutton' />
<script type='text/javascript'><!--
document.getElementById('{\$_PrevId_}').style.display = 'none';
//--></script></form>");
Markup('input-jumpbox', '<split',
'/\\(:input\\s+jumpbox\\s.*?:\\)(?:\\s*\\(:input\\s+jumpbox\\s.*?:\\))*/ei',
"InputSelect(\$pagename, 'jumpbox', PSS('$0'))");
Cheers,
Dan
More information about the pmwiki-users
mailing list