Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu of Anchors : Error ArgumentCountError #18

Open
amaury-hanser opened this issue Jun 11, 2018 · 1 comment
Open

Menu of Anchors : Error ArgumentCountError #18

amaury-hanser opened this issue Jun 11, 2018 · 1 comment

Comments

@amaury-hanser
Copy link

amaury-hanser commented Jun 11, 2018

Hello,

I'm trying to have an auto-generated menu like explained in the docs.

Problem:

Too few arguments to function Grav\Plugin\AnchorsTwigExtension::anchorsFunction(), 2 passed in XXX\user\plugins\anchors\twig\AnchorsTwigExtension.php on line 63 and exactly 3 expected

What I did:

  • I've added {{ anchors(page.content, 'li') }} in my .md file
  • I've added this in the frontmatter of the same .md file
process:
    twig: true

It seems like I'm missing an argument, but even if I write {{ anchors(page.content, 'li', '') }} I have the same error.

Am I missing something ?

PS: Everything is up to date

@amaury-hanser amaury-hanser changed the title Menu of Anchors : Error Menu of Anchors : Error ArgumentCountError Jun 11, 2018
@NicoHood
Copy link

I have the same issue, but this works for me:

{{ anchors(page.content, 'h2', null) }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants