We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37550 ☆ A M B ☆
    • 711 Posts
    Hi,

    I’m working on a new website and currently have wayfinder running a menu, wayfinder is hiding the members only pages until a member logs in.

    Is there anyway for me to easily configure wayfinder to still list secure pages in the menu?

    Ideally we would like visitors to see the links and be able to click on them and then be prompted to log in, if it’s secure.

    Thanks
      http://www.onesmarthost.co.uk
      UK MODX Hosting with love.
      • 4310
      • 2,310 Posts
      Aaron,
      This is untested so backup first! but you could try changing :
      $sql = "SELECT DISTINCT {$fields} FROM {$tblsc} sc LEFT JOIN {$tbldg} dg ON dg.document = sc.id WHERE sc.published=1 AND sc.deleted=0 AND ({$access}){$menuWhere} AND sc.id IN (".implode(',',$ids).") 

      to :
      $sql = "SELECT DISTINCT {$fields} FROM {$tblsc} sc LEFT JOIN {$tbldg} dg ON dg.document = sc.id WHERE sc.published=1 AND sc.deleted=0 {$menuWhere} AND sc.id IN (".implode(',',$ids).") 

      at around line 351 of wayfinder.inc.php
        • 37550 ☆ A M B ☆
        • 711 Posts
        Thanks for that David.

        I’ve just applied your hack direct to the WayFinder php file and it works a treat I was going to make an on and off switch but Shane has just messaged me and has put in a feature request for just that smiley

        http://modxcms.com/forums/index.php/topic,33904.msg206872.html#msg206872

        Thanks
          http://www.onesmarthost.co.uk
          UK MODX Hosting with love.
          • 4310
          • 2,310 Posts
          I thought I’d done the hack before, just couldn’t be sure.
          Thanks for the link.