MovableBlog: Edit This Page in Movable Type

Nuance 2.0

May 17, 2003

Dave Winer writes that MT doesn't have an 'Edit This Page' button. He is quite right, but there is a workaround, suggested here, which admittedly doesn't cover "every bit of text" as mentioned in his earlier piece on the subject. Just the weblog post text, and not any sidebar text etc.

It's not a new solution either. David Gagne has had it for a while now (scroll down to '"Hidden" Entry-Editing Link'). And it doesn't show up just for authenticated users, but for every user (the username and password is required if MT hasn't already set the cookie on the machine being used).

Here is the HTML I'd use (if I used it, which I don't):

<a title="this link is for admin use only" href="<$MTCGIPath$>mt.cgi?__mode=view&#038;_type=entry&#038;id=
<$MTEntryID$>&#038;blog_id=<$MTBlogID$>"> </a>

The above is placed somewhere between the MTEntries tag, preferably in the line that says "posted at" or whatever you have as tagline. It makes a space character into a link that edits the blog entry in question. (My modifications from David's code are to change &amp; to &#038;, target remove the Javascript elements and to replace &middot; with a space. Use whatever character you like.) As mentioned in a previous post, MT's public search function automatically generates an "Edit This Entry"-type link dynamically through the template.

So although Dave is correct that MT doesn't come with an "Edit This Page" button out of the proverbial box, something like it can be added with a little template tweaking.

Update 5:15 PM: I'm pretty sure I'm telling him what he already knows as to why it's happening, but Erik at nslog() reports his implementation of a 404 page which calls mt-search.cgi through PHP does not create an edit link for him dynamically.

Update 7:01 PM: just wanted to bring this more detailed tip, with extra 'security' measures using Javascript and CSS, to the front page. [via Trackback to this post]

Posted by Richard at 4:05

Comments

Just because someone says something is a feature does not necessarily make it so. I use both Manila and Movable Type. Have not found the "Edit this page" to be that much of a must have feature or a show stopper for MT. With browsers supporting tabbed interfaces I don't see the issue, one way or the other. Just jump from tab to tab to see your results...