Skip to content

Add ability to pass variables into isActivePath #6

@paulmolluzzo

Description

@paulmolluzzo

It'd be great to be able to pass in a user- or session-specific variable to test the path. For example, let's say I have the following paths:

  • /users
  • /users/:_id
  • /users/:_id/edit

And let's say the navigation is:

Home Users Ny Name

I'd like to make the "Users" link active for all 3 of the paths, except if I'm editing my own User account, then I want "My Name" to be active.

I tried doing something like this but it didn't work:

<li class="{{ isActivePath '{{ currentUser._id }}/edit' }}">

Is this already possible? Is this a limitation of Blaze/Handlebars?

TIA.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions