We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42503
    • 120 Posts
    Can any one help me to convert this code into revo code

    <?php
    $params = array("level" => 1);
    $id = isset($startId) ? $startId : $modx->documentIdentifier;
    // check if doc has a parent, if not we just use id
    $parent_id = $modx->documentObject["parent"];
    $id = $parent_id==0?$id:$parent_id;
    $params["startId"] = $id;
    return $modx->runSnippet('Wayfinder', $params);
    ?>


    Please help I got struck. [ed. note: pronab.saha last edited this post 13 years, 8 months ago.]
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Why not just use the UltimateParent snippet as the startId value?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 42503
        • 120 Posts
        I am getting you, can you explain it little more Please.
        Quote from: sottwell at Jan 18, 2013, 08:17 AM
        Why not just use the UltimateParent snippet as the startId value?
          • 42503
          • 120 Posts
          Where I can change the value can you please tell, got stuck badly

          Quote from: sottwell at Jan 18, 2013, 08:17 AM
          Why not just use the UltimateParent snippet as the startId value?
            • 42503
            • 120 Posts
            Please help.Quote from: sottwell at Jan 18, 2013, 08:17 AM
            Why not just use the UltimateParent snippet as the startId value?
              • 42503
              • 120 Posts
              My requirement is ame like this can you please help me.
              https://forums.modx.com/index.php?topic=60779.0Quote from: sottwell at Jan 18, 2013, 08:17 AM
              Why not just use the UltimateParent snippet as the startId value?
                • 22427
                • 793 Posts
                Try
                [[Wayfinder? &startId=`[[UltimateParent]]` &level=`1`]]
                  • 42503
                  • 120 Posts
                  No still the desired result is coming.

                  Quote from: ottogal at Jan 18, 2013, 09:45 PM
                  Try
                  [[Wayfinder? &startId=`[[UltimateParent]]` &level=`1`]]