我的控制器中有一个用于索引路径的动作
使用routing.yml
index:
pattern: /index
defaults: { _controller:AcmeDemoBundle:Default:index }
Run Code Online (Sandbox Code Playgroud)
控制器用于此路径
public function indexAction()
{
return $this->render('AcmeDemoBundle:Plugin:index.html.twig');
}
Run Code Online (Sandbox Code Playgroud)
和index.html.twig模板
{% extends'::base.html.twig' %}
{% block stylesheets %}
{% stylesheets filter='cssrewrite' output='css/*.css'
'bundles/acmedemo/css/*' %}
<link href="{{ asset_url }}" type="text/css" rel="stylesheet" />
{% endstylesheets %}
{% endblock stylesheets %}
{% block body %}
<br>
<div class="container">
<div class="wp_attachment_holder">
<div class="imgedit-response" id="imgedit-response-8"></div>
<div class="wp_attachment_image" id="media-head-8">
<p id="thumbnail-head-8"><img class="thumbnail" src="http://localhost/wordpress/wp-content/uploads/2014/06/121-1024x583.jpeg" style="max-width:100%" alt=""></p>
<p><a class="btn btn-sm btn-default" id="edik-wp-extended-edit">?????????????</a> <span class="spinner"></span></p>
</div>
<div style="display:none" class="image-editor" id="image-editor-8">
</div>
</div> …Run Code Online (Sandbox Code Playgroud)