Details
| Macro | editable |
|---|---|
| Author | James Mortimer |
| DateCreated | 2006-06-17 |
| LatestVersion | 1.3 |
| Description | Adds an 'edit page' tab at the top right. Useful for pages that will be 'included' within another page. Alternative for edit-include since the built in 'include' tag may automatically be updated when pages are renamed, while edit-include is certainly not. |
| Category | Link |
Usage
{editable}
Source
Version History
- v1.3 - smaller font, less bold border, changed 'go' to 'view'
## note: isPrintableVersion has a bug which prevents proper rendering in preview until confluence 2.2.1 #if($content && !$action.isPrintableVersion()) #set($pageId=$content.getIdAsString()) #set($url=$content.getUrlPath()) <style type="text/css"> <!-- span.editlink { float:right;position:relative; font-size:0.8em; } span.editlink span { position:absolute; top:2px; right:2px; border:1px solid #DDE; background-color:#EEE} span.editlink span a { text-decoration:none; font-weight:bold; } span.editlink span a:hover { background-color:#CFCFDF } // --> </style> <span class="editlink"> <span> <a href="/pages/editpage.action?pageId=${pageId}"> Edit </a>|<a href="${url}"> View </a> </span> </span> #else <span/> #end
- v1.2 - shows a 'go' button to navigate to the included page but not in edit mode
- v1.1 - Dependant on hacking the 'edit' action and getting the page ID
- v1.0 - Dependant on linking-plugin and renderer
Example
Unknown macro: {example-block}
Unknown macro: {example}
Unknown macro: {editable}
Unknown macro: {example-block}
Unknown macro: {example}
Unable to render {include} Couldn't find a page to include called: editable example
Screenshot
In the below example, the first example shows how {editable} renders on a current page. The second shows how that might appear when a page is included in a second page.


Comments (2)
Aug 21, 2007
Stefan Baader says:
Hi James, a good one. But it seems you made a little mistake: the context path ...Hi James,
a good one. But it seems you made a little mistake: the context path
My version:
Sep 04, 2007
Stefan Baader says:
Just an add on: show the edit/view button only it the user has the permission to...Just an add on: show the edit/view button only it the user has the permission to edit the included content.