collective / uwosh.snippets

Adds dynamically-updated rich text snippets to Plone. Update a snippet to display the change everywhere the snippet is used (pages, news items, events, anywhere rich text and TinyMCE appear).
4 stars 3 forks source link

dexterity support #8

Closed simahawk closed 6 years ago

simahawk commented 9 years ago

I'd like to have this working on DX. 'master' branch is not working with it, and 'dexterity' one is quite old and is broken too, maybe just for some old import declarations, like

from plone.directives import dexterity, form

Is there anyone using it on plone 4.3.2 w/ DX? Should I try to fix 'dexterity' branch? Tnx

simahawk commented 9 years ago

Also... I see it's using grok a lot... is there any plan to get rid of it?

obct537 commented 9 years ago

Hi @simahawk , the "dexterity" branch was mostly an experimental branch to see if I could get it running with DX as it's storage medium. It's basically "abandoned" at this point. If you wish to try to fix it, you're more than welcome to do so, however, as I'm pretty new to dexterity, it may not be very useful to you.

I guess I'm somewhat confused about your question, however. Are you attempting just to get the add-on running with DX installed? In which case, based on my own tests, that should work....if not, please let me know the specific issues you're having, so I can address them.

Or, are you attempting to get the add-on to use DX instead of the archetype Document objects that it uses for storage? In this case, since you asked specifically about Plone 4.3.2, I'm curious what advantage that would have? I'm not saying you're wrong, I just honestly don't know why it would be preferred...as I said, I'm kinda new to this stuff, so I wouldn't claim to know the best approach to everything :)

As far as grok is concerned, I don't really have any plans to get rid of it in the near future.

simahawk commented 9 years ago

Hi @obct537 , I'm using DX base content types from p.a.contenttypes - hence: no AT at all - and it does not work, or better: it's broken, mostly because it expects AT methods to be there (getExclFromNavigation, setText, etc). I'm willing to try to make it work. I think the best way would be to move snippet manager (or part of it) to different adapters for AT and DX. So, I'll have a deeper look at dexterity branch but maybe I'm going to create a new branch for my work.

obct537 commented 9 years ago

@simahawk Alright, I guess I hadn't considered that particular case, but the certainly makes sense.

If you want to add that functionality, I'd probably suggest making a new branch. You might be able to grab some useful information from the dexterity branch, but for the most part, I'd say it's too broke to be useful.

Something we may want to consider later in the future is being able to choose between AT and DX via a control panel option, or something similar. If you can get DX working as a backend, I suspect being able to toggle between them wouldn't be too difficult.

tkimnguyen commented 6 years ago

Closing this old discussion as @obct537 got this working with Plone 5