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

Allow path navigation for templates #1076

Closed
Haehnchen opened this issue Nov 11, 2017 · 5 comments
Closed

Allow path navigation for templates #1076

Haehnchen opened this issue Nov 11, 2017 · 5 comments
Labels

Comments

@Haehnchen
Copy link
Owner

{% extends 'bar/foo.html.twig' %}
{% extends ':bar:foo.html.twig' %}
{% extends 'bar:sub:foo.html.twig' %}
{% extends '::foo.html.twig' %}

Split navigation target on directory seperator

'index' 'base.html.twig'
Haehnchen added a commit that referenced this issue Nov 13, 2017
@King2500
Copy link
Contributor

👍

@King2500
Copy link
Contributor

Will we get this inside Controller and annotation as well?

$this->render('bar/foo.html.twig');
@Template('bar/foo.html.twig')

@Haehnchen
Copy link
Owner Author

yes its on the way ;)

@Haehnchen
Copy link
Owner Author

done

@King2500
Copy link
Contributor

This is still not working with a custom render method (which has a placed #Template hash in it's PHPDoc):

$this->render('@myModule/showFoo.html.php');
class MyBaseController
{
    /**
     * @param string $template #Template
     * @param array $vars
     */
    protected function render($template, $vars)
    {
        //...
    }
}

The template file is resolved and goto works. But not path navigation when Ctrl+click on @myModule.

The @myModule package is defined via ide-twig.json and listed correctly in "Twig / Template" namespaces settings.

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

No branches or pull requests

2 participants