I’m trying to customize the Optimize SEO page, specifically the website.TitleDescription section.
I found the original template as follows:
<t t-name="website.TitleDescription">
<section>
<div class="row">
<div class="col-lg-6">
<div class="mb-3">
<label for="website_meta_title">
Title <i class="fa fa-question-circle-o" title="The title will take a default value unless you specify one."/>
</label>
<input type="text" t-model="seoContext.title" t-att-disabled="!props.canEditTitle" class="form-control" placeholder="Keep empty to use default value" maxlength="70" size="70" t-ref="autofocus"/>
</div>
<div class="mb-3">
<label for="website_meta_description">
Description <i class="fa fa-question-circle-o" t-att-title="props.previewDescription"/>
</label>
<textarea t-model="seoContext.description" t-att-disabled="!props.canEditDescription" name="website_meta_description" placeholder="Keep empty to use default value" class="form-control"/>
<div t-if="descriptionWarning.length" class="alert alert-warning mt16 mb0 small">
<span t-esc="descriptionWarning"/>
</div>
</div>
<div class="mb-3" t-if='props.canEditUrl'>
<label for="website_seo_name">
Custom Url <i class="fa fa-question-circle-o" t-att-title="props.seoNameHelp" />
</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text seo_name_pre" t-esc="seoNamePre"/>
</div>
<input type="text" class="form-control" t-att-placeholder="props.seoNameDefault"
t-on-input="_updateInputValue" t-att-value="seoContext.seoName"/>
<div class="input-group-append" title="Unalterable unique identifier">
<span class="input-group-text seo_name_post" t-esc="seoNamePost"/>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="card-header">Preview</div>
<div class="card mb0 p-0">
<div class="card-body">
<SEOPreview isIndexed="props.isIndexed" title="title" description="description" url="url"/>
</div>
</div>
</div>
</div>
</section>
</t>
I created an inherited template as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="custom_Optimize_seo.TitleDescriptionInherit" t-inherit="website.TitleDescription">
<xpath expr="//input[@t-model='seoContext.title']" position="after">
<div class="est_ccs">
<h1>Test</h1>
</div>
</xpath>
</t>
</templates>
And my manifest file looks like this:
'assets': {
'web.assets_frontend': [
# 'theme_vcs/static/src/scss/style.scss',
],
'web.assets_backend': [
# 'website/static/src/components/dialog/seo.xml',
'custom_Optimize_seo/static/src/xml/seo_template.xml',
],
},
However, it’s not working as expected.
Could you please help me check the code?
Thank you very much!