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

Run mediaembed after Twig #23

Open
ItsShadowCone opened this issue Dec 18, 2016 · 0 comments
Open

Run mediaembed after Twig #23

ItsShadowCone opened this issue Dec 18, 2016 · 0 comments

Comments

@ItsShadowCone
Copy link

I have a simple loop in Twig inside my page that iterates over an array and outputs code for mediaembed like the following

{% for video in videos %}
    ![]({{video}})
{% endfor %}

The problem is, that in the first hook, onPageContentRaw, mediaembed is called with the raw twig code (before twig) whereas in the second hook (onPageContentProcessed) it is called where the twig code is already substituted (after markdown). I would like to have mediaembed called between twig and markdown.

From what i found, wouldn't it be better if mediaembed is called within onMarkdownInitialized instead of or additinally to the other two hooks? see this example: https://github.com/getgrav/grav/pull/747#issuecomment-206821370`

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

1 participant