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.

1

Where can I find the CSS files for the Website Builder.

By
Mark Wells
on 12/31/14, 3:13 PM 2,268 views

I want to makes some modifications to the CSS for the standard Blog in the Website builder.  Does anyone know where those CSS files for the Themes are located??

/odoo/addons/website_blog/static/src/css/website_blog.css

Anil R. Kesariya
on 1/1/15, 3:54 AM

Thanks Luke

Mark Wells
on 1/2/15, 9:11 AM
3

Luke Branch

--Luke Branch--
1531
| 6 7 8
Mui Wo, Lantau, Hong Kong
--Luke Branch--

...

Luke Branch
On 12/31/14, 9:20 PM

You can find the CSS, XML, and JS for the blog in:

XML:
/addons/website_blog/views/
/addons/website_blog/static/src/xml

CSS:

/addons/website_blog/static/src/css

JS:

/addons/website_blog/static/src/js

I'd recommend leaving the core files alone, as otherwise you will lose your changes when you upgrade the module in the future.

You can refer to the following guide as a reference for inheriting and over-riding the standard CSS, XML, and JS:

https://www.odoo.com/forum/help-1/question/new-bootstrap-theme-on-website-builder-58809

What i'd recommend is creating a new, very basic module to override/replace the core files with your own modified files for the blog. You can do this by following the instructions below:

  1. Create a new directory in your addons directory for your module (eg. website_blog_mark)
  2. create an empty __init__.py file in that folder (this can be used to add python logic to your module later, but will be uneccessary for your current requirements)
  3. create an __openerp__.py with the following in it (you can change my customisations such as Blog CSS Mark Wells, etc.):

    {

    'name': 'Blog CSS Mark Wells',

    'category': 'Website',

    'website': 'http://www.YOURWEBSITEHERE.com',

    'summary': 'News, Blogs, Announces, Discussions',

    'version': '1.0',

    'description': """

    Mark Wells Blog

    ============

    """,

    'author': 'Mark Wells',

    'depends': ['website_blog'],

    'data': [

    'data/theme.xml',

    ],

    'installable': True,

    'application': True,

    }

  4. create a subdirectory in your theme called data
  5. create a file in data called theme.xml
  6. put the following content in theme.xml:
    <?xml version="1.0" encoding="UTF-8"?>
  7. follow the instructions in the forum post link i've provided to either replace the files with your own custom css, js, and xml using xpath to inherit and replace files, or parts of files
  8. create a subdirectory in your modules root directory called static (eg. /addons/website_blog_mark/static)
  9. create subdirectories for css, js, xml, or whatever else you'd like to put into your module.
  10. in your theme.xml file you can add your custom css and js as required by using the module's path (eg. website_blog_mark/static/css/mark_theme.css)

Feel free to post back in the comments if you have any more questions.

How can I access/change it (the CSS file) using the Website Builder - Web Interface?

Taher Giyori
on 8/8/16, 7:33 AM

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

4 follower(s)

Stats

Asked: 12/31/14, 3:13 PM
Seen: 2268 times
Last updated: 9/24/15, 10:33 PM