This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » eZ Publish 5 Platform » Legacy layout not loading for me in...
expandshrink

Legacy layout not loading for me in 404 errors

Legacy layout not loading for me in 404 errors

Wednesday 18 February 2015 8:45:21 pm - 2 replies

Hi. Don't know if this could have relation with the legacy separation from the kernel. i'm trying with dev-master btw. 

My issue is i'm waiting to have a 404 error page. Actually it seems this error is finally controlled by legacy stack. (please correct me if i wrong) 

So, after reading this i added this to my ezpublish.yml file

But it seems that pagelayout_legacy.html.twig file i'm try to use is not called at all. Actually symfony toolbar for the ez publish template part shows all those tpl files but says nothing about twig...

Any ideas? 

Modified on Wednesday 18 February 2015 8:59:29 pm by Carlos Revillo

Saturday 14 March 2015 9:54:03 pm

 

Hi Carlos,

may be you have resolved your problem, but i think it is enough to define the pagelayout_legacy.html.twig only in parameters.yml :

parameters:
    ezpublish_legacy.my_siteaccess.module_default_layout: my_Bundle::pagelayout_legacy.html.twig

creating the pagelayout_legacy.html.twig inside your bundle views folder:

 {% block content %}    
{{ module_result.content|raw }}
{% endblock %}

You can override the eZ standard template for the 404 file inside your extension in:extension/my_extension/design/ezdemo/templates/error/kernel/20.tplSo if you have a MultiLanguage Site, then the 20.tpl Text should also be also translated

Ramzi

Modified on Saturday 14 March 2015 9:57:27 pm by Ramzi Arfaoui

Monday 16 March 2015 10:58:54 am

I prefer another way to create 404 page im bundle:

http://share.ez.no/forums/developer/overriding-legacy-error-pages-templates

Just play with the code to create the  404.html.twig and translated (|trans)

Ramzi

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from