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.21 00.08 MarkupToHTML begin
3: 00.22 00.09 MarkupToHTML begin
4: 00.28 00.12 MarkupToHTML end
5: 00.28 00.12 MarkupToHTML begin
6: 00.28 00.13 FPLTemplate begin
7: 00.28 00.13 MakePageList pre
8: 00.30 00.13 PageListSources begin
9: 00.30 00.13 PageStore::ls begin wiki.d/{$FullName}
10: 00.44 00.15 PageStore::ls merge wiki.d/{$FullName}
11: 00.51 00.19 PageStore::ls end wiki.d/{$FullName}
12: 00.52 00.20 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
13: 00.52 00.20 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
14: 00.52 00.20 PageStore::ls end $FarmD/wikilib.d/{$FullName}
15: 00.53 00.20 PageListSources end count=860
16: 00.53 00.20 PageListSort pre ret=4 order=name
17: 00.53 00.20 MakePageList items count=860, filters=
18: 00.56 00.22 MakePageList post count=860, readc=0
19: 00.56 00.22 PageListCache begin save key=bc376443f784b7881e414e124e222dd8
20: 00.56 00.22 PageListCache end save
21: 00.56 00.22 PageListSort begin
22: 00.56 00.22 PageListSort sort
23: 00.63 00.28 PageListSort end
24: 00.63 00.28 MakePageList end
25: 00.64 00.29 MarkupToHTML begin
26: 00.67 00.32 MarkupToHTML end
27: 00.67 00.32 FPLTemplate end
28: 00.67 00.32 MarkupToHTML end
29: 00.69 00.34 MarkupToHTML end
30: 00.71 00.36 MarkupToHTML begin
31: 00.74 00.39 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
32: 00.75 00.40 ReadApprovedUrls SiteAdmin.ApprovedUrls end
33: 00.77 00.42 MarkupToHTML end
34: 00.77 00.42 MarkupToHTML begin
35: 00.78 00.43 MarkupToHTML end
36: 00.80 00.45 now