Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
Test /
JumpBox
|
(:input jumpbox value=JumpBox:) (:input jumpbox value=Test:) (:input jumpbox value=Cookbook:) (:input jumpbox value=Toyama:) (:input jumpbox value=Gyokusendo:) (:input jumpbox value=Suwada:) (:input jumpbox value=Maruto:) (:input jumpbox value=Kaneko:) |
Or, from a pagelist:
(:if false:)
[[#jumpbox]]
(:input jumpbox value="{=$PageUrl}" label="{=$Title}":)
[[#jumpboxend]]
(:ifend:)
(:pagelist group=Test fmt=#jumpbox count=6:)
|
The local customization used to enable (:input jumpbox ...:):
<?php if (!defined('PmWiki')) exit();
$InputTags['jumpbox'] = array(
'name' => 'n',
':html' =>
"<form action='{$PageUrl}' method='get'>
<select onchange='window.location.href=this.options[this.selectedIndex].value'
\$InputSelectArgs>\$InputSelectOptions</select>
<input type='submit' value='$[Jump to page]' /></form>");
Markup('input-jumpbox', '<split',
'/\\(:input\\s+jumpbox\\s.*?:\\)(?:\\s*\\(:input\\s+jumpbox\\s.*?:\\))*/ei',
"InputSelect(\$pagename, 'jumpbox', PSS('$0'))");
With minor modifications this local customization may also provide a hidden submit button as Option Menu recipe did (Dfaure):
<?php if (!defined('PmWiki')) exit();
$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'))");
0: 00.00 00.00 config start 1: 00.00 00.00 config end 2: 00.62 00.05 MarkupToHTML begin 3: 00.62 00.05 MarkupToHTML begin 4: 00.64 00.07 MarkupToHTML end 5: 00.64 00.07 MarkupToHTML begin 6: 00.64 00.07 FPLTemplate: Chain begin 7: 00.64 00.07 FPLTemplate: FPLTemplateLoad 8: 00.64 00.07 FPLTemplate: FPLTemplateDefaults 9: 00.64 00.07 FPLTemplate: FPLTemplatePageList 10: 00.64 00.07 MakePageList pre 11: 00.64 00.07 PageListCache begin load key=bc376443f784b7881e414e124e222dd8 12: 00.68 00.07 PageListCache end load 13: 00.68 00.07 PageListSources begin 14: 00.68 00.07 PageListSources end count=1005 15: 00.68 00.08 PageListSort pre ret=4 order=name 16: 00.68 00.08 MakePageList items count=1005, filters= 17: 00.69 00.08 MakePageList post count=1005, readc=0 18: 00.69 00.08 PageListSort begin 19: 00.69 00.09 PageListSort sort 20: 00.75 00.14 PageListSort end 21: 00.75 00.14 MakePageList end 22: 00.75 00.14 FPLTemplate: FPLTemplateSliceList 23: 00.75 00.15 FPLTemplate: FPLTemplateFormat 24: 00.75 00.15 MarkupToHTML begin 25: 00.76 00.16 MarkupToHTML end 26: 00.76 00.16 FPLTemplate: Chain end 27: 00.76 00.16 MarkupToHTML end 28: 00.78 00.18 MarkupToHTML end 29: 00.79 00.19 MarkupToHTML begin 30: 00.82 00.21 ReadApprovedUrls SiteAdmin.ApprovedUrls begin 31: 00.83 00.22 ReadApprovedUrls SiteAdmin.ApprovedUrls end 32: 00.84 00.24 MarkupToHTML end 33: 00.84 00.24 MarkupToHTML begin 34: 00.85 00.25 MarkupToHTML end 35: 00.86 00.25 now