Comment 9 for bug 152635

Samuel Schluep (schluep) wrote :

I found the reason for the KeyError, ''view_method': the layout_macro.html of the SilvaDLCMS default layout and the SilvaDLCMSLayout product contain a tal definition that set the variable view_method to options/view_method. The subscriptor does not supply the view_method in the request, therefore a KeyError is thrown. In the standard Silva layout the options/view_method is also called, but only in the main slot of the macro. The dLCMS layouts use view_method also at other places. This KeyError can be solved with the following tal definition: tal:define="global view_method options/view_method | nothing". I'll correct this for both, the dLCMS default layout and SilvaDLCMSLayout.