Details
-
Improvement
-
Resolution: Obsolete
-
Low
-
None
-
4.1.3, extension/ezwebin 1.3-3
-
None
Description
ref: http://universaleditbutton.org/Universal_Edit_Button
Used by many wiki engines to show a universal edit button when your on a editable page.
Reasons we should do this:
- Might become part of html5 in some form and supported by next round of browsers.
- Already supported by most wiki engines and wp(plugin).
Reasons we should not do this:
- Its not a standard by any means, and will undergo changes before it becomes one.
- Only supported by plugins for Opera / Firefox
- Spec currently defines content type as application/wiki witch is wrong (the content type of the link is most probably text/html, so it is very misleading) and does not suite eZ Publish very well as our content model is far richer then just wikis.
- A page in eZ Publish can contain several elements that are editable, not just one.
How to implement:
From the wiki page this seems to be the form we should use
<link rel="edit" type="application/x-wiki" title="Edit '<page_name>'!" href="/content/edit/<object_id>/f/<locale>" />
So patch for ezwebin would be something like:
Index: ezwebin/design/ezwebin/templates/link.tpl =================================================================== --- ezwebin/design/ezwebin/templates/link.tpl (revision 3938) +++ ezwebin/design/ezwebin/templates/link.tpl (working copy) @@ -16,4 +16,11 @@ <link rel="Alternate" href={concat("layout/set/print/", $site.uri.original_uri)|ezurl} media="print" title="{'Printable version'|i18n('design/ezwebin/link')}" /> {/if} +{if and( $current_node_id, $pagedata.is_edit|not )} + {def $current_node = fetch( 'content', 'node', hash( 'node_id', $current_node_id ) )} + {if $current_node.object.can_edit} + <link rel="edit" type="application/x-wiki" title="Edit '{$current_node.name}'!" href={concat( 'content/edit/', $current_node.contentobject_id, '/f/', ezini( 'RegionalSettings', 'ContentObjectLocale', 'site.ini') )|ezurl} /> + {/if} + {undef} +{/if} {/default} \ No newline at end of file