Odoo 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 management
|
MRP
|
etc.
What is the xpath selector to get facebook open graph tag in my <head> section?
Hello all,
I'm searching the right xpath expr selector to change the content attribute of each of those Facebook open graph tag in the < head> section of my main template.
Someone could help?
Thanks
<template id="website_lapagept.facebook_open_graph_description_iv" inherit_id="website_lapagept.website_layout_iv" name="Facebook open graph description - IV">
<xpath expr='//head/meta[@property="og:title"]' position="attributes">
<attribute name="content">Intime et vilain</attribute>
</xpath>
</template>
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="website_lapagept.website_layout_iv" name="Main layout - IV"><!DOCTYPE html>
<html t-att-lang="lang and lang.replace('_', '-')">
<head>
<meta charset="utf-8" />
<meta t-attf-property="og:title" t-attf-content="marde de" />
<meta t-attf-property="og:type" t-attf-content="marde de" />
<meta t-attf-property="og:image" t-attf-content="marde de" />
<meta t-attf-property="og:site_name" t-attf-content="marde de" />
<meta t-attf-property="og:description" t-attf-content="marde de christ" />
[......]
UPDATE : I tried those expressions with no luck :
expr="//meta[@property="og:title"]/@content"
Here is a solution that works!
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="website_lapagept.website_layout_iv" name="Main layout - IV"><!DOCTYPE html>
<html t-att-lang="lang and lang.replace('_', '-')"
t-att-data-website-id="website.id if editable and website else None"
t-att-data-editable="'1' if editable else None"
t-att-data-translatable="'1' if translatable else None"
t-att-data-view-xmlid="xmlid if editable else None"
t-att-data-main-object="repr(main_object) if editable else None"
t-att-data-oe-company-name="res_company.name">
<head>
<meta charset="utf-8" />
<!-- <t t-call="website_lapagept.facebook_open_graph_description_iv">
</t>-->
<meta property="og:title" content="marde de " />
<meta property="og:type" content="marde de " />
<meta property="og:image" content="marde de " />
<meta property="og:site_name" content="marde de " />
<meta property="og:description" content="marde de " />
AND
<template id="website_lapagept.facebook_open_graph_description_iv" inherit_id="website_lapagept.website_layout_iv" name="Facebook open graph description - IV">
<xpath expr='//meta[@property="og:title"]' position="attributes">
<attribute name="content">Intime et vilain</attribute>
</xpath>
</template>
About This Community
This platform 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.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 9/22/15, 2:22 PM |
Seen: 2249 times |
Last updated: 9/22/15, 2:36 PM |