[ADD] website: add new page management
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/...)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<span class="js_menu_label">
|
||||
<t t-esc="submenu.name"/>
|
||||
</span>
|
||||
<i class="pull-right fa fa-home" style="margin-top: 3px"/>
|
||||
<i t-if="submenu.is_homepage" class="pull-right fa fa-home" style="margin-top: 3px"/>
|
||||
</span>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary js_edit_menu fa fa-pencil-square-o"/>
|
||||
@@ -54,8 +54,12 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">Link</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="radio" name="link_menu_options" id="url" value="url" checked="checked"/> <label class="control-label mr16" for="url" >URL or Email</label>
|
||||
<input type="radio" name="link_menu_options" id="new_page" value="new_page"/> <label class="control-label" for="new_page">New Page</label>
|
||||
<div class="radio">
|
||||
<label class="checkbox-inline" for="new_page"><input type="radio" name="link_menu_options" id="new_page" value="new_page" checked="checked"/>New Page</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label class="checkbox-inline" for="url"><input type="radio" name="link_menu_options" id="url" value="url" />URL or Email</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user