Skip to Content
Menu
This question has been flagged
4 Replies
5840 Views

I modified a product brand module to have individual pages inside the shop for my product brands.  All seems to be working except for the title/meta descriptions on these pages. When I set them via Promote -> Optimize SEO the same tags seem to apply to every page. How would I get individual title/meta descriptions for all these brand pages?


Odoo.sh v12

Avatar
Discard
Author Best Answer

The problem is my brand pages do not have a unique title.  They share the title with /shop 

I want:

/shop  -- Title to be "Dental Equipment and Supplies"

/shop/brand/a-dec-quality-refurbished-1 - Title to be "Products by A-dec"

/shop/brand/air-techniques-3 - Title to be "Products by Air Techniques"

But when I use the Optimize SEO function, the same title gets set to all my shop and brand links.  I guess I need to do something pragmatically to get odoo to give me unique titles?

Also the link above does not work, however I think I've read the page you are trying to share and if I recall it doesn't have anything about the programming/implementation of the Optimize SEO function, which is what I'm looking for.


----------


Edit:  This was the solution I was looking for:  https://www.odoo.com/documentation/12.0/reference/mixins.html#website-metadata

Avatar
Discard
Best Answer

Hi

You just need to visit the corresponding page first and click Promote>Optimize SEO

Suppose if you want to change Title and Meta of "Contact us" Page,
Just visit that page on your site and click Promote>Optimize SEO.

Thanks

Avatar
Discard
Best Answer

You have to add in your controller`s returned value main_object like this:

My example:

@http.route([

        '/categories',

        '''/categories/subcateg/<model("product.public.category"):category>''',

    ], type='http', auth="public", website=True)

    def categories(self, category=None):

        categories = request.env['product.public.category'].sudo().search([('parent_id', '=', False)])

        data = {

            'category': category,

            'categories': categories

        }

        if category:

            data.update({'main_object': category})

        return request.render("ks_theme_kinetik.ks_categories", data)

Avatar
Discard
Best Answer

Hello Anthony,

Please check the below link. This may help you.

https://www.odoo.com/documentation/user/12.0/website/optimize/seo.html​

Thanks

Avatar
Discard
Related Posts Replies Views Activity
2
Jul 24
300
2
Jul 22
2798
1
Sep 21
2498
3
Sep 21
7265
2
Sep 21
7701