Fork me on GitHub

Pagemaster: Sorting the search  Bottom

  • I build a simple "Search-Form" for to show a publist with filter like:

    Code

    <form  id="bewnr_form" method="post" action="<!--[pnmodurl modname='PageMaster' tid='1' filter='bewnr:eq:$bewnrq']-->">  
                <label><strong>Bewirtschafternummer: </strong></label>
                <input type="text" id="bewnrq" name="bewnrq" size="10" maxlength="8" value="<!--[$bewnrq|pnvarprepfordisplay]-->" />
               <span class="z-formbuttons"><input type="submit" value="Anzeigen" /></span>        
    </form>


    After that I would like to sort the shown results, but there is no possibility to get the filter once more icon_confused

    If I try:

    Code

    <!--[formutil_getpassedvalue assign='test' name='test', default=$bewnrq source='POST']-->


    I'll get an empty string for $test

    Anyone could help?



    Edited by frw on Oct 06, 2010 - 06:37 PM.
  • in your form I see: id="bewnrq" name="bewnrq"

    formutil_getpassedvalue is the 'new' pnvarcleanfrominput, and you're catching 'test' which is not available, try

    Code

    <!--[formutil_getpassedvalue name='bewnrq' assign='catch_bewnrq']-->
    <!--[$catch_bewnrq]-->

    normally you would see the $catch_bewnrq

    - Igor
  • Thanks - I don't know why (because I've tested before with 'bewnrq'...) but now it's working.
    Perhaps because of the ',' after name='bewnrq' I deleted...
  • But now, the next question about this behaviour:

    I wish to use the value of $catch_bewnrq within the filter-clause of pagemaster for the action of a formular like:

    Code

    action=index.php?module=pagemaster&tid=1&filter=$catch_bewnrq:eq:$suche


    ($suche is the value from the input field). This wont work, the filter only shows filter=eq:$suche, but $catch_bewnrq has a value (says pndebug)...

    Anyone could help?
  • Yes, use the pnRender plugin assign_concat to build your filter string and then assign it using filter=$filterstring ...

    That should sidestep that issue ...

    Greetings
    R
  • Hi Robert,

    any reading-stuff how to use assign_concat ?
  • Something like:

    assign_concat param1='$catch_bewnrq' name='$filterstring' HTML='true'

    ???
  • Quote

    Code

    action=index.php?module=pagemaster&tid=1&filter=$catch_bewnrq:eq:$suche


    You could try

    Code

    action=index.php?module=pagemaster&tid=1&filter=`$catch_bewnrq`:eq:`$suche`
    or

    Code

    <!--[assign var="thefilter" value=$catch_bewnrq|cat:":eq:"|cat:$suche]-->
    action=index.php?module=pagemaster&tid=1&filter=$thefilter
  • OK, thx - I'll try tomorrow, because it's intranet on job.

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