Re: Developer manual "tutorials" section?
Dylan Jay <dylan-Q+/Sk2sTzaxWk0Htik3J/[email protected]> Fri, 18 Feb 2011 00:07:12 +1100
| Newsgroups | gmane.comp.web.zope.plone.documentation |
|---|---|
| Message-ID | <[email protected]> |
On 17/02/2011, at 10:31 PM, Raphael Ritz wrote: > On 2/17/11 12:06 PM, Mikko Ohtamaa wrote: > > [..] > >> >>> I've been thinking hard on how to do this but no answers yet. >>> For those not aware the community manual on plone.org is actually >>> the >>> result of a conversion process from svn -> sphinx -> funnelweb -> >>> plone. The information on where items used to be isn't available to >>> sphinx from svn so it's not possible automate this yet so any >>> renaming >>> in svn won't result in redirects in plone :( Unless someone can >>> think >>> of a clever way to get svn to produce a list of previous paths for >>> each piece of content. >>> The only solution would be to manually reproduce the moves in plone >>> first and then reupload the content overtop. >>> >> >> The conversion process is already little fragile, so I suggest >> let's not try >> to make it more complicate and we'll just rely on Plone's automatic >> "Page >> not found - suggestions" feature :) > > If the change consists of "only" moving some subtree to a different > location (without changing the structure within the tree) you can > maintain the old links by defining a Python Script (TTW in ZMI in > the parent folder of the moved one) like so: > > base = container.absolute_url() > subpath = '/'.join(traverse_subpath) > url = base + <relative path to new location> + subpath > context.REQUEST.RESPONSE.redirect(url) > > The script needs to have the same id as the folder that > moved elsewhere. Guess you get the idea. > More of a hack or work-around but functional. Interesting hack but unfortunately the problem isn't how to get it to redirect (that's already taken care of) but knowing what to redirect from. I did have on idea on this. If there was a convention of putting a small section on the bottom of each sphinx page which listed the "previous" paths that page was available at. We could then create a transmogrifier blueprint which extracted those paths and that could be used by transmogrify.ploneremote to set the plone redirector ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb