website.page = old ir.ui.view with page=True
website.redirect is a new mechanism to replace in the futur the ir.attachment
mechanism of redirect.
From now, we don't have a specific /page controller to serve 'page'.
We use a new model website.page which is rendered if none route matches the url
and that the field 'url' on website.page matches the request.httprequest.path.
The order to serve a path is:
- Routes defines in controllers (/shop, /blog, ...)
- ir.attachment with name matching the path
- website.page with url matching the path
- website.redirect with url_from matching the path
- 404
To improve:
- allow regexp in website.redirect model
- allow to edit the view_arch from the page.management via redirect backend
(needed when traceback in the page, or when modifying a js/css/less/...)
128 lines
5.4 KiB
XML
128 lines
5.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<templates id="template" xml:space="preserve">
|
|
<t t-name="Configurator.language_promote">
|
|
<t t-foreach="language" t-as="lang">
|
|
<option t-att-value="lang[0]" t-att-selected="lang[0] == def_lang ? 'selected' : null"><t t-esc="lang[1]" /></option>
|
|
</t>
|
|
</t>
|
|
|
|
<div t-name="website.seo_configuration">
|
|
<section class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-horizontal mt16" role="form">
|
|
<div class="form-group">
|
|
<label for="seo_page_title" class="col-xs-3 control-label">Page Title</label>
|
|
<div class="col-xs-9">
|
|
<input type="text" name="seo_page_title" class="form-control" maxlength="70" size="70"/>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="seo_page_description" class="col-xs-3 control-label">Description</label>
|
|
<div class="col-xs-9">
|
|
<textarea name="seo_page_description" class="form-control" style="max-width: 100%;height:145px;max-height:145px" t-att-maxlength="widget.maxDescriptionSize"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<h5 class="mt16">Preview <small>how your page will be listed on Google</small></h5>
|
|
<div class="well">
|
|
<div class="panel mb0">
|
|
<div class="panel-body">
|
|
<div class="js_seo_preview"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<hr/>
|
|
<div class="js_seo_tips" />
|
|
<section class="js_seo_keywords_list">
|
|
<h4 class="mt16">Define Keywords <small>describing your page content</small></h4>
|
|
<table class="table table-responsive">
|
|
<thead>
|
|
<tr>
|
|
<td>
|
|
<div class="form-inline" role="form">
|
|
<div class="input-group">
|
|
<input type="text" style="min-width:170px" name="seo_page_keywords" class="form-control" placeholder="Keyword" maxlength="30"/>
|
|
<span class="input-group-btn">
|
|
<select name="seo_page_language" id="language-box" class="btn form-control"/>
|
|
</span>
|
|
<span class="input-group-btn">
|
|
<button data-action="add" class="btn btn-success" type="button">Add</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>Suggested<br/><small class="text-muted">Most searched topics related to your keywords, ordered by importance:</small></td>
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr>
|
|
<td/>
|
|
<td><hr/>
|
|
<small class="text-muted">Legend:</small>
|
|
<span class="label label-default">Not used</span>
|
|
<span class="label label-success">In title</span>
|
|
<span class="label label-primary">In description</span>
|
|
<span class="label label-info">In page's content</span>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</section>
|
|
</div>
|
|
|
|
<t t-name="website.seo_suggestion_list">
|
|
<ul class="list-inline mb0">
|
|
<!-- filled in JS -->
|
|
</ul>
|
|
</t>
|
|
|
|
<t t-name="website.seo_list">
|
|
<tbody>
|
|
<!-- filled in JS -->
|
|
</tbody>
|
|
</t>
|
|
|
|
<t t-name="website.seo_tip">
|
|
<div t-attf-class="alert alert-#{ widget.type }">
|
|
<t t-raw="widget.message"/>
|
|
</div>
|
|
</t>
|
|
|
|
<t t-name="website.seo_keyword">
|
|
<tr>
|
|
<td>
|
|
<span t-attf-title="#{ widget.tooltip() }" t-attf-class="oe_seo_keyword #{ widget.highlight() } js_seo_keyword" t-att-data-keyword="widget.keyword">
|
|
<t t-raw="widget.keyword"/> <a href="#" class="oe_remove" data-action="remove-keyword"/>
|
|
</span>
|
|
</td>
|
|
<td class="js_seo_keyword_suggestion">
|
|
<!-- filled in JS -->
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
|
|
<t t-name="website.seo_suggestion">
|
|
<li class="oe_seo_suggestion">
|
|
<span t-attf-title="#{ widget.tooltip() }" t-attf-class="oe_seo_keyword #{ widget.highlight() } js_seo_suggestion" t-att-data-keyword="widget.keyword">
|
|
<t t-raw="widget.keyword"/>
|
|
</span>
|
|
</li>
|
|
</t>
|
|
|
|
<t t-name="website.seo_preview">
|
|
<li class="oe_seo_preview_g">
|
|
<div class="rc">
|
|
<div class="r"><t t-esc="widget.title"/></div>
|
|
<div class="s">
|
|
<div class="kv"><t t-esc="widget.url"/></div>
|
|
<div class="st"><t t-esc="widget.description"/></div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</t>
|
|
</templates>
|