Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4759 Lượt xem

In Odoo 14, I'm trying to add some templates that inherits `portal.frontend_layout`. But it's throwing `Element '< xpath expr="//head/link[last()]" >' cannot be located in parent view.`


In portal.frontend_layout, inherits web.frontend_layout, where I can see that `//head/link[last()]` code is there & the inherited web.layout DOES has link inside head tag.


Is it an issue on the base code? or something wrong in my inherited view?


This is my sample code:

    < template id="website_menu_header_customized" 
inherit_id="portal.frontend_layout"
name="Header Language Link" >
....

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

You have to inherit web.frontend_layout instead of portal.frontend_layout because portal.frontend_layout doesn't have any head tag.    

<template id="website_menu_header_customized"
inherit_id="web.frontend_layout"
        name="Header Language Link">


Hope it helps

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 2 24
32533
0
thg 4 22
3541
2
thg 3 24
2808
1
thg 8 22
2315
2
thg 3 22
4299