Odoo Help

Welcome!

This community 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.

0

Had anyone tried to add own button color to the Website-Editor?

By
Mathias Neef
on 10/16/14, 12:10 PM 521 views

Had anyone tried to add an own button color to the Website-Builder?

I'm struggling wiht the xpath, but i don't get it. Every time I tried, I received an ParseError: "too many values to unpack" while parsing None:13

Problem is, that there is no unique hook to set the xpath, like an id or name.

Here is some code:
<template id="cp_link_style" inherit_id="website.editor.dialog.link" name="cp Link Style">
    <xpath expr="//input[@value='btn-danger']" position="after">
         <li>
            <label class="btn btn-copado">copado Style<input value="btn-copado" class="link-style" type="radio" name="link-style-type"/></label>
        </li>    
    </xpath>
</template>

and here are several xpath's:

<xpath expr="//li/label/input[@value='btn-danger and @name='link-style-type']" position="after">
<xpath expr="//label[text()='${Style}']/div/div/ul" position="inside">
<xpath expr="//li/label[@class='btn btn-danger']/input[@value='danger']" position="after">
...

The file which is "xpathed" is addons/website/static/src/xml/website.editor.xml

Thanks for help in advance.

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/16/14, 12:10 PM
Seen: 521 times
Last updated: 3/16/15, 8:10 AM