Howto: 'edit item' links

The default Nucleus skin includes 'edit item'-links that are only visible to the author of a item and to the people having the right to alter the item. This section explains which template-parts are needed for this feature to work.

'editlink'-template

The 'Edit Link'-templatepart defines how an 'edit item'-link is formatted. By default, the contents is:

<a href="<%editlink%>" onclick="<%editpopupcode%>">edit</a>

If you would rather edit the item in the admin area, instead of in the popup bookmarklet, use the following code instead:

<a href="nucleus/index.php?action=itemedit&amp;itemid=<%itemid%>">edit</a>

Positioning the edit-link

Next to the 'editlink' template, there's the <%edit%>-templatevar that, when placed somewhere in the 'item body'-templatepart, inserts the editlink.

See the example from the karma votes howto to see an example.

Skins & Templates