hi bruno,
i think you can indeed achieve this with the publishable feature. you
could create your own publishable voter that checks if the document is a
draft or the real thing. or you could have your editing force the
publisheable boolean field to false for people not allowed to publish
(and not show the flag in the frontend).
using child documents sounds like a feasable idea. you can then map that
to the normal document, and have
- the backend generate preview links with something like a ?preview=true
flag
- create a route enhancer that comes last, that checks for the preview
flag and if its present replaces the normal document with its draft child.
- access is checked with the publish workflow checker which afaik comes
after the routing.
if you say that any child that starts with eg "draft_" as nodename is a
draft, and the preview flag identify the individual draft, you could
even have multiple parallel drafts.
if you go this way, one thing you would need to figure out as well is
how to generate the route for that document - as it will not have a
route of its own but its parent document has. either extend the normal
document for the draft and make its getRoute return
$this->parent->getRoute() or do something in the route generator. if you
have several different documents, the generate might be the better place...
let us hear how it works out. at the very least, this should be a
cookbook entry in the cmf documentation. maybe we can even add it in one
of the bundles.
cheers,david
> <mailto:
da...@liip.ch>>:
> > <mailto:
bruno....@gmail.com <mailto:
bruno....@gmail.com>>>:
> >
> > Hi
> >
> > Thanks for all the answers. I'll discuss with the team here and see
> > what we choose.
> >
> > I'm inclined to the "copy-on-button-click" solution. It seems the
> > most reasonable solution to me.
> >
> > I'll tell you about our decision and would like to please count with
> > your guidance to implement it.
> >
> > 2015-04-24 6:12 GMT-03:00 Daniel Rotter
> > <
daniel...@massiveart.com
> <mailto:
daniel...@massiveart.com>
> <mailto:
daniel...@massiveart.com
> <mailto:
daniel...@massiveart.com>>>:
> >
> > Sadly we didn't have time yet to implement the versioning
> > capabilities in Sulu :(
> >
> > Am Donnerstag, 23. April 2015 13:43:10 UTC+2 schrieb Lukas Kahwe
> > Smith:
> >
> >
> > > On 23 Apr 2015, at 13:36, Bruno Reis <
bruno....@gmail.com <mailto:
bruno....@gmail.com>> wrote:
> > >
> > > Nice. But, I don't know if I used the right terminology.
> > >
> > > What I need is:
> > >
> > > 1 To have some kind of preview for a new content that is visible by some roles but not by everybody.
> > >
> > > 2 A way to edit a document and save a candidate for a new 'release'. A copy of that document that can be previewed and, if approved, can be published.
> > >
> > > Number 2 seems more complicated because I will need two existing documents on the tree, the actual one and the candidate one.
> > >
> > > Is anything like that in your roadmap? I'd like to elaborate something that will be helpful for the project, not only for us.
> > >
> > > Also, there are other two options to think:
> > >
> > > 1 - to put some versioning/restore functionality on the sonata admin. Do you intend to keep with the sonata admin?
> > >
> > > 2 - also to implement versioning in the doctrine odm. Do you have a cost estimate for this?
> >
> > CMS like AEM etc solve this by basically running a staging
> > server and a production server. Publishing content then
> > means moving new/updated content from the staging repository
> > to the production repository.
> >
> > I am not sure but
sulu.io <
http://sulu.io>
> <
http://sulu.io> might have
> > already implemented this approach.
> >
> > regards,
> > Lukas Kahwe Smith
> >
sm...@pooteeweet.org <mailto:
sm...@pooteeweet.org>
> >
> >
> >
> > --
> > You received this message because you are subscribed to the
> > Google Groups "symfony-cmf-users" group.
> > To unsubscribe from this group and stop receiving emails from
> > it, send an email to
> >
symfony-cmf-us...@googlegroups.com
> <mailto:
symfony-cmf-users%2Bunsu...@googlegroups.com>
> > <mailto:
symfony-cmf-us...@googlegroups.com
> <mailto:
symfony-cmf-users%2Bunsu...@googlegroups.com>>.
> <mailto:
symfony-cmf-users%2Bunsu...@googlegroups.com>
> > <mailto:
symfony-cmf-us...@googlegroups.com
> <mailto:
symfony-cmf-users%2Bunsu...@googlegroups.com>>.
> <tel:%2B41%2043%20500%2039%2080>
> CH-8005 Zurich // PGP 0xA581808B //
www.liip.ch <
http://www.liip.ch>
>
> --
> You received this message because you are subscribed to the Google
> Groups "symfony-cmf-users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
symfony-cmf-us...@googlegroups.com
> <mailto:
symfony-cmf-users%2Bunsu...@googlegroups.com>.