Help - Search - Members - Calendar
Full Version: Shortcut From A Static Page To The Editable Version Of It
Movable Type Community Forum > Other Product Discussion > Desired Features
Mark Stosberg
If I'm looking at a page on my own blog, I'd like a direct way to edit it, even if I'm looking at the public static version.

This could be accomplished in two parts. Let's look at example, starting with this URL:

http://mark.stosberg.com/bike/2008/07/you-...-right-now.html

I should be able to use this URL as part of a query string which produces the edit screen for the post (possibly requiring me to login in the process). For example, something this could be made to work:

http://mark.stosberg.com/mt/mt.cgi?edit_po...-right-now.html

That's a mouthful, but there are easy options to make it super-easy:

1. Add a Firefox "keyword", so you can then just add the "mt" prefix before the URL:
mt http://mark.stosberg.com/bike/2008/07/you-...-right-now.html

And that will expand into the full editable URI.

Or 2. Create a GreaseMonkey "User Script" so that blog pages are modified when displayed in the admin's browser to display an "edit this post" link.

I got used to a feature like in the Cascade CMS, released in 2001. Like MT, it also wrote out static pages, and I could just hack the URI to to turn a static URI into a dynamic version for admin's.





Su-
This is probably less a full-on feature than a snippet, or set of them.

When you're editing an entry in MT, the url looks like this:
CODE
http://test.onmovabletype.com/cgi-bin/mt42/mt.cgi?__mode=view&_type=entry&id=96&blog_id=2

So the core of what you're asking for is little more than adding a link someplace in your individual archive template roughly like:
CODE
<a href="<$mt:CGIPath$><$mtAdminScript$>?__mode=view&_type=<$mt:EntryClass$>&id=<$mt:EntryID$>&blog_id=<$mt:BlogID$></a>Edit</a>

But that's the easy part, since it's also static. Meaning everyone will see it.
I'd personally want it to only be visible to those who could actually use it, which is where we get into whether to use Javascript(which is still marginally "out in the open"), or whatever server-side scripting language is available depending upon output format.

If you look at the sign in/register widget in the <a href="http://forums.movabletype.org/">forum template set</a>, there's probably enough there to repurpose into a Javascript solution.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.