Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Can I show latest blog posts in a block on the home page?

Subscribe

Get notified when there's activity on this post

This question has been flagged
homepageblog
14 Replies
9774 Views
Avatar
David Vandervoort

I would like to display the latest 3 blog posts in a block on the home page, just the title and tagline in more or less the same way as on the blog overview page. Can it be done? If so, how? 


0
Avatar
Discard
Avatar
Ermin Trevisan
Best Answer

There is a "latest blog post" website builder snippet in most of Odoo's website builder themes which displays the 3 latest posts.

2
Avatar
Discard
David Vandervoort
Author

Thanks Ermin, but it seems that it is not available in the theme I am using. Also should have mentioned in my question that I'm on version 8 probably.

Ermin Trevisan

There is no difference between 9.0 and 8.0 concerning this. Which theme are you using?

David Vandervoort
Author

Cerulean at the moment, but also tried others, it doesn't seem to be in there

Ermin Trevisan

Ah, the free bootsstrap themes only contain a few basic snippets. If you use one of the paid themes, you get about 90 building blocks/snippets included (check the theme description).

David Vandervoort
Author

Thanks Ermin, any theme you would recommend / have experience with?

Ermin Trevisan

As a 50-Themes-Pack-Supporter of the Indiegogo campaign I have experience with a lot of themes (https://www.indiegogo.com/projects/bootstrap-themes-for-odoo-cms#/). You should select your theme according to the looks and the list of building blocks it offers. Check all themes in the app store, look at the building blocks they offer and thoroughly look at the live preview. If you know what you would like, ask me before to check it (obviously there are mistakes in the themes descriptions, for example theme KEA does have the latest post building block, but you won't find it in the description).

David Vandervoort
Author

Theme "Louma" looks very promising, so far it seems to be the only one that offers a sidebar menu in their description. However, they don't have a latest posts widget. Do you any theme that has both?

Ermin Trevisan

I can not say anything about non-Odoo themes. Avantgarde is an Odoo theme, that offers a hamburger navigation button with the menu on the right side bar and has the latest posts building block.

Ermin Trevisan

By the way, I believe that my help so far is well worth an upvote! :-)

David Vandervoort
Author

It sure is Ermin! I was just too pre-occupied with my own stuff, sorry for that and many thanks for the great help!

Ermin Trevisan

:-) thanks

Avatar
Silvestar j
Best Answer

from openerp import http

class BlogPosts(http.Controller):

    @http.route(['/page/homepage'], type='http', auth="public", website=True)

    def blog_posts(self, **kwargs):

            post = http.request.env['blog.post'].search([])

            values = {

                'post_ids' : post,

             }

           return request.website.render("website_posts.index", values)




This is xml Template View

-----------------------------------------

<template id="index" inherit_id="website.homepage" name="Homepage">

<xpath expr="//div[@id='wrap']" position="inside">


<div class="row">

<div class="col-xs-12">

<div class="news_list">

<div t-foreach="post_ids" t-as="news">

<a t-field="news.name" t-attf-href="/blog/#{ slug(news.blog_id) }/post/#{slug(news) }"

style="text-align:left;font-size:16px;font-color:#fff;text-decoration:

none;"

class="new_title">

<t t-if="not news.name" style="text-align:left;">Untitled

Post

</t>

</a>

<div class="news_name">

<div name='blog_post_data'>

<span t-field="news.author_id" style="display: inline-block;"

t-field-options='{

"widget": "contact", "fields": ["name"] }' />

<i class="fa fa-clock-o"></i>

<span t-field="news.create_date"

t-field-options='{"format": "dd MMMM yyyy

HH:MM"}' />

<span t-if="not news.website_published" class="label label-danger">not

published

</span>

</div>

</div>

<div class="oe_structure" />

</div>

</div>

</div>

</div>

<div class="oe_structure" />





</xpath>

</template>



2
Avatar
Discard
Avatar
gameswowsg@gmail.com
Best Answer

Hi we are also looking for something called blog post preview when we share the post on social media but we are unable to see the blog post preview. For example https://www.odes.com.sg/blog/our-blogs-1/what-is-enterprise-resource-planning-erp-1 

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
how can i remove "in" proposition from blog post footer?
blog
Avatar
Avatar
1
Feb 24
2344
Blogs Name disappears from select new blog post
blog
Avatar
0
Nov 23
2369
Add links to other tools/URLs to home page
homepage
Avatar
0
Nov 24
3767
Cant change text colour in blogs
blog
Avatar
Avatar
1
Jul 21
2627
odoo home action field only works in developer mode
homepage
Avatar
0
Jun 21
3076
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now