Front-end edit link

Here is a quick and handy tip to create a link to a Textpattern article edit tab from the front end of your website.

You’ll need the rvm_privileged plugin for the following to work.

The front end edit article link

Place this in any article form – just after the <txp:body /> tag works well.

<txp:rvm_if_privileged>
	<a href="/textpattern/index.php?event=article&amp;step=edit&amp;ID=<txp:article_id />">
		<img src="/img/edit-article.png" alt="edit article" />
	</a>
</txp:rvm_if_privileged>

Works for images too!

For images, place this within your <txp:images /> tag:

<txp:rvm_if_privileged>
	<a href="/textpattern/index.php?event=image&step=image_edit&id=<txp:image_info type="id" />">
		<img src="/img/edit-image.png" alt="edit image" />
	</a>
</txp:rvm_if_privileged>

You need to keep each link discrete (else they will interfere with your layout). I use tiny images as buttons, styled via css like position: absolute; opacity: .5;

little-hand You don’t notice they are there unless you look for them…

comments powered by Disqus