2012-04-05 4 views
0

in routing.yml RESSOURCE kann ich andere Routing-configs RESSOURCE mit:Symfony2: Wie eine Routing-Datei im XML-

AcmeTestBundle: 
resource: "@AcmeTestBundle/Resources/config/routing.xml" 
prefix: /

Wie funktioniert der gleiche Config Blick in XML?

Ich habe versucht:

<route id="AcmeTestBundle"> 
    <default key="_ressource">AcmeTestBundle/Resources/config/routing.xml</default> 
</route> 

Aber das funktioniert nicht ...

Antwort

1

Werfen Sie einen Blick auf die offizielle Handbuch

http://symfony.com/doc/current/book/routing.html#including-external-routing-resources

Dort finden Sie auf der Registerkarte klicken können benannte "XML"

<!-- app/config/routing.xml --> 
<?xml version="1.0" encoding="UTF-8" ?> 

<routes xmlns="http://symfony.com/schema/routing" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd"> 

    <import resource="@AcmeHelloBundle/Resources/config/routing.xml" /> 
</routes> 
+1

Vielen Dank, haben Sie nicht die erste gefunden: