We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29181
    • 480 Posts
    // &parents [ comma separated list of IDs | ’’ ]

    is in the snippet b it would appear that &parents=`10` does not influence the snippet results in any way?

    Has anyone found a solution to this? I noticed a similar post in the forum but alas without an answer...I’m hoping I have more luck!

    Thanks,
    Taff

    [UPDATE] I have turned on the debug mode and apparently it is not finding the parents param
    [3-Jun-09 01:01:51] AjaxSearchPopup - User configuration - Before doSearch : Array.

    I added a few comments into the code to try to find the error, but unfortunately without any success so far.

    In the snippet itself:
    // &parents [ comma separated list of IDs | '' ]  
    // IDs of documents to retrieve their children to &depth depth  where to do the search - - empty list by default
    $cfg['parents'] = isset($parents) ? $parents : (isset($__parents) ? $__parents : '');
    echo "<!-- CONFIG PARENTS = ".$cfg['parents']."-->";


    outputs the parent as I would expect, ie 10.

    ajaxSearch.class.inc.php
      function AjaxSearch($cfg) {
      
        // load configuration snippet options
        $this->cfg = $cfg;
    	echo "<!--";
    	echo "in the class itself<br />";
    	var_dump($cfg);
    	var_dump($this->cfg);
    	echo "-->";
      }
    


    both cfg and $this->cfg output parents as 10.

    On a sidenote I am using version 1.8.1 with ajaxsearch turned off.

    I am using comments as the site is live.
      Adrian Lawley: www.adrianlawley.com
      • 29181
      • 480 Posts
      The plot thickens....
      The problem is that I am not using ajaxSearch. So I set all my parameters on a content page like this:

      [!AjaxSearch? ajaxSearch=`0` &parents=`36` &AS_landing=`132` &moreResultsPage=`132` &showMoreResults=`1` &addJscript=`0` &extract=`0` &AS_showResults=`0`!]


      or

      [!AjaxSearch? ajaxSearch=`0` &parents=`37` &AS_landing=`132` &moreResultsPage=`132` &showMoreResults=`1` &addJscript=`0` &extract=`0` &AS_showResults=`0`!]


      depending upon the language, but how do I get the parents parameter passed to the more results page. I thought it would have been as easy as

      <input type="hidden" name="parents" value="[+as.parents+]" />


      but there appears to be no placeholder being created with that name.

      Can anyone help me?

      Thanks,
      Taff
        Adrian Lawley: www.adrianlawley.com
        • 29181
        • 480 Posts
        I ended up using a phx placeholder to add UltimateParent. Unfortunately that won’t work with Part 2 of the problem so if anyone has delved deep enough into the code or done something similar, I would more than appreciate some input.

        Thanks,
        Taff
          Adrian Lawley: www.adrianlawley.com