Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
While creating a pattern library for a project I encountered the problem of displaying xml code in the frontend in <code> or <pre> didn't work. The code is placed in a new view, a new page.
What I wanted to do is to have this shown in the frontend exactly so:
<a class='btn btn-primary' href='#'>Confirm</a>
I don't want to show the actual button. So my code looks like this:
<a class='btn btn-primary' href='#'>Confirm </a>
In this case, Odoo still renders the code inside the <pre> tags and displays the button.
I tried also replacing the pre for code element, a combination of pre and code, using CDATA. In every case, the button will be rendered instead of the xml markup.
<![CDATA[&lt;a class='btn btn-primary' href='#'&gt;Confirm &lt;/a&gt;]]>
The only (current) way I found so far is to put spaces in the tags, it's the only thing that keeps the code from being rendered:
<a class='btn btn-primary' href='#'> Confirm </a>
Thanks in advance for any help!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 11/17/15, 4:46 AM|
|Seen: 1667 times|
|Last updated: 12/3/15, 8:30 AM|