question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable custom Twig tags

See original GitHub issue

I get an error when I use CMS specific custom Twig tags, such as the nav and endnav tag of Craft CMS (https://docs.craftcms.com/v2/templating/nav.html)

[error] Expected a known tag such as
[error] - autoescape
[error] - block
[error] - do
[error] - embed
[error] - extends
[error] - filter
[error] - flush
[error] - for
[error] - from
[error] - if
[error] - import
[error] - include
[error] - macro
[error] - set
[error] - spaceless
[error] - use
[error] - moun

Would be nice to extend this rule

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:17

github_iconTop GitHub Comments

5reactions
twbartelcommented, Mar 1, 2020

Version 0.4.0 is out and should fix this issue. @sjelfull @chasegiunta thanks for your patience!

4reactions
twbartelcommented, Feb 25, 2020

Update to everyone interested: I’m very close to being able to handle custom Twig tags in an easy way. Waiting for https://github.com/trivago/melody/pull/154 to be merged into Melody master, then I can merge some functionality into this project. Stay tuned!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Write a custom Twig Extension (Symfony Docs)
Twig Extensions allow the creation of custom functions, filters, and more to use ... Next, register your class as a service and tag...
Read more >
How to create a twig custom tag that executes a callback?
First, as Twig code can be put on a file, on a string or even on a database, Twig opens and reads your...
Read more >
Using Custom Content Types and Fields with Twig - Drupal
Quick reference for creating custom types, and fields, and how they are accessed in Twig.
Read more >
Add custom Twig extension [closed] - Drupal Answers
I have the module enabled and cleared the cache but it seems that the custom filter is not affecting twig. How can I...
Read more >
Custom Entity Methods in Twig Templates - Chromatic
It is easy to see Twig code samples and just accept that label is some magic property of an entity now and use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found