[pmwiki-users] Input Select To Trigger Go To Page

Sivakatirswami katir at hindu.org
Wed May 9 15:03:06 CDT 2007


The Editor wrote:
> 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'))");
> 
> 
OK see my previous "rant" about scope bloat and looking for
bottom line answers on this, but I went ahead and tried this
but it doesn't work. I have it in

Site.RightBar

and get this:

Other Project Pages:

(:template first:)
    Box here with "Jump to page" label page name
(:template each:)
    Box here with first  page name in page list
(:template first:)
    Box here with next  page name in page list
(:template each:)
  Box here with next  page name in page list
(:template first:)
  Box here with next  page name in page list
(:template each:)
  Box here with next  page name in page list
(:template first:)

etc for all pages in the group...



skts



More information about the pmwiki-users mailing list