0

I'm really new in Symfony and AJAX and i hope you can explain me how should I do :

enter image description here I have several elements in Page A, each of them corresponding to elements in several Pages B(1,2,3).

I want to catch elements from a specific Page like B2 and to show it in Page A with the matching element in Array AJAX.

A route already exists in Routing.yml for Folder Controller:

bundle_test:
resource: "@Bundle/Controller"
type: annotation
prefix: /

I have to create specifics routes ? How should i do ? Thx.

vincent
  • 43
  • 7

1 Answers1

1

In Page A, put this code

{% include 'twig from Pages B' with {'xxx': test, ...} %}

You can customize this code with yours. You can replace test with any variables from Page A. As for xxx, replace it with the variables from Pages B.

david
  • 3,225
  • 9
  • 30
  • 43