eZ Community » Forums » eZ Publish 5 Platform » how to define route and twig template...
expandshrink

how to define route and twig template to modify for a specific content_type

how to define route and twig template to modify for a specific content_type

Thursday 16 February 2017 2:14:05 pm

hi all,

well I come her because I don't find any solutions on forum to solve my problem.

First of all we install on our server ezplatform 5 on symfony 2.8.11 I made the complete tutorial for a blog biker... no trouble to reproduce. All was fine but I had to define a different structure for our projet.

So I made in Bo ez to new content_type had call categories and content_categories. This was done to having categories menu and and after content_category that could be load in different place on front office. My idea is to had categories a content if i need and as a parent container surely. More hover I could say to my controler in categories in wich block I have to render content or child content...

So after a time I had no trouble to make my own bundle and controler for the home page and having a front office same as the design have been made with this two content_type. No more trouble to have the correct menu and other render block on homepage.

So in my header menu (you could see here http://montfermeil.twin-solutions.fr/) I success to create link to subcontent link with urlalias and so when you click on it you arrive on the location render page but without html content... and this my trouble I don't success to reach and modify route and template for those child content_category (http://montfermeil.twin-solutions.fr/Ma-ville/La-ville) or parent categories. The ez render the good vars but how to exactly the route and write it on siteaccess or in controler/bundle route ?
For the moment I have this to the siteacess :

<span>full:
</span><span>    root_folder:
</span><span>        </span><span>#path: "/"
</span><span>        </span><span>template: </span><span>"full/root_folder.html.twig"
</span><span>        </span><span>match:
</span><span>            Id\Location: </span>2
    <span>categories:</span><span>        </span><span>
</span><span>        </span><span>template: </span><span>"full/categories_full.html.twig"
</span><span>        </span><span>match:
</span><span>            Id\Location: </span>[categories]            
    <span>content_category:</span><span>       </span><span>
</span><span>        </span><span>template: </span><span>"full/content_category.html.twig"
</span><span>        </span><span>match:
</span><span>            Id\Location: </span>[content_category]
            

But this don't modify my pagelayout ?! I need serious help to resolve I'm sure it could be easy for some one. So is there anybody this afternoon to help me to solve my routing trouble ?!
Thanks in advance for any help

Regards
François 

No reply yet!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from