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 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
This question has been flagged
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:
- Create a new directory in your addons directory for your module (eg. website_blog_mark)
- 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)
- 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,
}
- create a subdirectory in your theme called data
- create a file in data called theme.xml
- put the following content in theme.xml:
<?xml version="1.0" encoding="UTF-8"?> - 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
- create a subdirectory in your modules root directory called static (eg. /addons/website_blog_mark/static)
- create subdirectories for css, js, xml, or whatever else you'd like to put into your module.
- 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?
/odoo/addons/website_blog/static/src/css/website_blog.css
Thanks Luke