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

No auto-completing using @Template annotation #773

Closed
dev-marcel opened this issue Aug 11, 2016 · 8 comments
Closed

No auto-completing using @Template annotation #773

dev-marcel opened this issue Aug 11, 2016 · 8 comments
Labels

Comments

@dev-marcel
Copy link

dev-marcel commented Aug 11, 2016

When using the @template annotation for actions:

/**
* @author Marcel van Nuil marcel@ambta.com
* @route("{edmCampaign}", name="_dashboard_edm_campaign_view")
* @Security("has_role('ROLE_ADMIN') or has_role('ROLE_USER') or has_role('ROLE_TELEMARKETER') or has_role('ROLE_COMPANY_USER')")
* @template("ExampleBundle:Template/Dashboard/Pages/Edm:CampaignView.html.twig")
* @ParamConverter("edmCampaign")
*
* @param EdmCampaign $edmCampaign
*
* @return array
*/
public function viewAction(EdmCampaign $edmCampaign)
{
return [
'edmCampaign' => $edmCampaign
];
}

You do not have auto-completing in the Twig template. This only works when you use return $this->render. For ease we now use both, but would be nice if only the @template annotation would be sufficient.

@MiguelAlcaino
Copy link

I'm facing the same issue at the moment. Not sure if it is my installation or the plugin. I remember it was working.

@Haehnchen Haehnchen added the todo label Aug 19, 2016
@Haehnchen
Copy link
Owner

no support for this atm, only render or folder structure detection

@MiguelAlcaino
Copy link

Thanks @Haehnchen Your are very kind! :)

@MiguelAlcaino
Copy link

It is happening in all the alias starting with "@".

@MiguelAlcaino
Copy link

MiguelAlcaino commented Oct 17, 2016

Hi @Haehnchen .Hope you are well!.
After the last update the aliases of templates are not working with this format too:

AppBundle:ViewFolder:myView.html.twig
Also it is not working with:
@App/ViewFolder/myView.html.twitg

You can see this when using the "@ Template" annotation inside a controller.

Cheers!

@Haehnchen
Copy link
Owner

Haehnchen commented Oct 17, 2016

@MiguelAlcaino os environment issue hopefully fixed now :) #803.

fyi: i will go for template annotation next

@MiguelAlcaino
Copy link

It is working now! Thanks @Haehnchen !

@Haehnchen
Copy link
Owner

so closeable

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

3 participants