Fork me on GitHub

Pagesetter onSelect  Bottom

  • Hello-

    I'm not certain how to accomplish what I need but I can describe it:

    I need a select box that dynamically lists all Pagesetter pids and builds an onselect list so a user can simply select the pid they want and they are redirected to that pid.

    Any idea how to accomplish this?

    Many thanks!
  • I did something similar.
    Put in your full template or list-header:

    Code

    <form id="filtra" >
    <select name="filtraCategoria" ONCHANGE="location = this.options[this.selectedIndex].value;">
    <option value="">Filter publication</option>
    <!--[pagesetter_inlinePubList5  tid=2 orderby=$core.pid pubcnt=-1]-->
    </select>
    </form>

    in your inlineList you must have:

    Code

    <option value="<!--[pnmodurl modname="pagesetter" tid=2 func=viewpub pid=$core.pid]-->"><!--[$core.pid]--></option>


    hope it helps



    edited by: arkanoyd, May 21, 2009 - 02:00 AM
  • Little Javascript:

    Code

    function MM_jumpMenu(targ,selObj,restore){ //v3.0
      eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
      if (restore) selObj.selectedIndex=0;
    }

    little HTML:

    Code

    <!--[pagesetter_readpubCount tid=$core.tid assign=CountPubs]-->
    <select onChange="MM_jumpMenu('parent',this,0)" id="SelectList">
    <!--[pagesetter_inlinePubList tid=$core.tid pubcnt=$CountPubs]-->
    </select>

    and your inlineList:

    Code

    <option value="<!--[pnmodurl modname=pagesetter func=viewpub tid=$core.tid pid=$core.pid]-->"><!--[$core.pid]-->: <!--[$core.title]--></option>

    You can of course hard code the '$core.tid' to the actual tid number...
    Is it something like this you mean?
    - Igor
  • Thanks to both of you. I made a slightly modified version of Igor's stuff. It worked brilliantly!

    Thanks so much!
  • 0 users

This list is based on users active over the last 60 minutes.