modules / filters results in syntax error

7 views
Skip to first unread message

Cli F

unread,
Sep 7, 2016, 10:43:36 PM9/7/16
to apostrophenow
The filters code referenced in the new guid at http://apostrophenow.org/tutorials/getting-started/building-navigation.html results in an error:

SyntaxError: Unexpected token {


Changing the { to a [ results to more errors...

Any clues?

modules: {

  // ... other configuration ...

  'apostrophe-pages': {
    filters: {
      {
        // Grab our ancestor pages, with two levels of subpages
        ancestors: {
          children: {
            depth: 2
          }
        },
        // We usually want children of the current page, too
        children: true
      }
    }
    // other apostrophe-pages options like `types` ...
  },

  // ... other configuration ...
}

Cli F

unread,
Sep 8, 2016, 3:26:33 AM9/8/16
to apostrophenow
Just to update my last message, solution is just remove a set of brackets:

filters: {
      
        // Grab our ancestor pages, with two levels of subpages
        ancestors: {
          children: {
            depth: 2
          }
        },
        // We usually want children of the current page, too
        children: true
      },

Tom Boutell

unread,
Sep 8, 2016, 7:12:25 AM9/8/16
to apostr...@googlegroups.com
Thanks! This correction is live on the site.
> --
> You received this message because you are subscribed to the Google Groups
> "apostrophenow" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to apostropheno...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--


THOMAS BOUTELL, SUPPORT LEAD
P'UNK AVENUE | (215) 755-1330 | punkave.com
Reply all
Reply to author
Forward
0 new messages