Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi I was just wondering if there was a way to add a 'edit this post' link to the current article/post?

I have tried:

Code: Select all
<a class="edit" href="<cms:show k_admin_link />?act=edit&tpl=<cms:show k_template_id />&p=<cms:show k_page_id />">Edit</a>


But get 'Security tokens do not tally for executing this action'. Obviously because quite sensibly they use nonce generated security tokens.

Any suggestions?

Thanks in advance.
Welcome mattl :)

As it happens, Couch has just the tag for you.
This is undocumented as yet but please try
Code: Select all
<a href="<cms:admin_link />">EDIT</a>

You'd obviously want to output this only for admin/super-admins, so just wrap it around with a simple conditional like this
Code: Select all
<cms:if k_user_access_level ge '7' >
  <a href="<cms:admin_link />">EDIT</a>
</cms:if>


Hope this helps. Please let me know.
Works perfectly - thank you very much!
3 posts Page 1 of 1