Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-text phrase types #52

Open
localstatic opened this issue Oct 9, 2013 · 5 comments
Open

Non-text phrase types #52

localstatic opened this issue Oct 9, 2013 · 5 comments

Comments

@localstatic
Copy link

It would be helpful if Copywriting would support non-text phrase types (e.g. images, resources, etc).

I understand if this goes too far from the intended purpose of the extension, but it seems like Copywriting might be the best of the existing extensions for adding extra metadata to pages, and this new functionality would be extremely helpful.

@localstatic
Copy link
Author

I am working on this for my current project. So far, I have already implemented image phrases, and it works well. I may need some other types as well before I'm done (e.g. boolean). If this is functionality that would be useful and wanted in Copywriting, I would be happy to open a pull request when I'm done. If not, i can just use my customized version for this project.

Let me know...

@unixcharles
Copy link
Owner

Hi @localstatic, thanks for the feedback. You could do it using phrase_type options set to wysiwyg.

Its not as slick but it would work. If you come up with a better solution, pull request are welcome. I'm just not sure of what would happen with the semantic. It would be a bit confusing to have a phrase that is actually an image lol.

@localstatic
Copy link
Author

That semantic issue was exactly my reservation about this change. I have implemented image phrases using phrase_type=image, and it does work. I added logic for that to the value_field partial, so there's even an image picker. It's pretty slick, I think, but it just doesn't fit with the name ;)

Anyway, here's my branch if you're interested in checking it out: https://github.com/localstatic/refinerycms-copywriting/tree/new-phrase-types.

I'll submit a pull request when I'm done (I may only need the image type afterall, so that may be soon). If you want to merge it, great. If you decide it's not a good fit, I will harbor no hard feelings.

@localstatic
Copy link
Author

To wrap this up, I've decided that this change is bigger than originally thought. The new phrase types work when the phrase is attached to a particular page, but otherwise, there is a clash between the global phrase edit UI's dialog and the image picker dialog that is used for an "image" phrase.

I'm wrapping up my project, and frankly am exhausted with Refinery, so I don't think I'll be pursuing this any further. If you want to use my changes and find a solution for the dialog conflict, that would be awesome. It may not be worth the effort though, and I'll totally understand if you close this issue as wontfix.

Thanks for the great extension. It's one of the few that I really was glad to have available, and it saved me a lot of work.

@unixcharles
Copy link
Owner

No problem, I might look into it later. Thanks for sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants