Hello, I am trying to setup a snippit to be added on all my pages which will add a link directly to the manager edit page.
Heres what I have so far:
<?php
// First see if we pass authorization
if(! isset($_SESSION[’mgrValidated’]) || !$_SESSION[’mgrValidated’])
return "";
// Build link
$str_link = ’<a href="/manager">Manager</a>’;
$str_link = $str_link . ’ <a href="/manager/index.php?a=27id=’ . $modx->documentIdentifier . ’">(edit)</a>’;
$str_link = $str_link . ’ | ’;
return $str_link;
?>
Unfortunatly the link to the edit page isn’t right... i’m not sure how i can get it to go directly to edit rather than just to the manager front page.
Ok after I looked into this more I found that the manager page link actually calls a javascript function. Here is the code from manager page (view document data area that has the "edit" button:
<div class="subTitle">
<span class="right">View document data</span>
<table cellpadding="0" cellspacing="0" class="actionButtons">
<td id="Button1"><a href="#" onclick="editdocument();"><img src="media/style/MODxLight/images/icons/save.gif" align="absmiddle"> Edit</a></td>
<td id="Button2"><a href="#" onclick="movedocument();"><img src="media/style/MODxLight//images/icons/cancel.gif" align="absmiddle"> Move</a></td>
<td id="Button4"><a href="#" onclick="duplicatedocument();"><img src="media/style/MODxLight/images/icons/copy.gif" align="absmiddle"> Duplicate</a></td>
<td id="Button3"><a href="#" onclick="deletedocument();"><img src="media/style/MODxLight/images/icons/delete.gif" align="absmiddle"> Delete</a></td>
</table>
</div>
Note quite sure where editdocument() is located but I am guessing I can extract the info I need from that javascript function if I can find it.
Alternatively is there a way to invoke that functioncall remotely and open the right edit page?
Are you trying to access Manager editing tools/features from from outside the Manager?
Have you seen the FDM (Front end Document Manager) snippet?
Just took a look at it but it looks like it pops up its own editor... again, all i want is a url to point the browser to that will open the manager in edit mode to the current document.
Ah, I understand now.
I’ve not seen anything like that before.
Maybe someone else has tried it before and will post.