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

Various questions #776

Closed
dantium opened this issue Nov 2, 2014 · 3 comments
Closed

Various questions #776

dantium opened this issue Nov 2, 2014 · 3 comments

Comments

@dantium
Copy link

dantium commented Nov 2, 2014

I am not sure if this is the right place to ask these questions but I could not find anywhere else.

  • With the Hallo editor I can not see any way to insert things like tables or even view the content source to directly enter HTML is there someway to do this? I see there is insert_editor_js to added plugins for Hallo but is there a correct way to implement another WYSIWYG editor?
  • I can not see anyway of controlling menu items outside of pages, is there anyway of simply creating a menu item and assigning a URL to it?
  • I see there is simple password protection for pages, if i want a members login area would the best way to do this be extending the Page model with a login decorator?
  • Using the lastest demo project and wagtail==0.7 Something in the dashboard is causing slow page loading in firefox, the osx spinner is showing for short while (chrome seems fine) maybe some JS issue?

Thanks

@dantium
Copy link
Author

dantium commented Nov 2, 2014

Also I could not work out how to select different templates for pages, would I need to create a new Page child model to have a different template? Maybe it would be useful to be able select an override template in the admin for a page and it's children?

Thanks again

@davecranwell davecranwell changed the title Wagtail WYSIWYG Editor Various questions Nov 3, 2014
@gasman
Copy link
Collaborator

gasman commented Nov 3, 2014

Hi @dantium,

The Google group is generally the best place for questions, but asking on here works too!

  • hallo.js has a plugin available for editing the HTML directly - I think I've seen one for tables too, but can't find it now. In Wagtail we intentionally keep the editing controls stripped-down by default, to discourage rich text fields from becoming a 'dumping ground' for arbitrary HTML - if you find yourself needing more than basic text formatting, you should probably consider creating a new page model for whatever data you're trying to convey.

Having said that - there's some discussion of extending the hallo.js editor here https://groups.google.com/d/msg/wagtail/bdlUNeFl_xI/ASvBX_oakWUJ - Joss's blog post at http://jossingram.wordpress.com/2014/07/24/add-some-blockquote-buttons-to-wagtail-cms-wysiwyg-editor/ is probably the clearest step-by-step explanation.

Replacing hallo.js with another WYSIWYG editor entirely would be a considerable amount of work - it isn't just a drop-in replacement, since it has to integrate with the rest of Wagtail for things like inserting images and links.

  • Wagtail doesn't prescribe any particular way of doing menus on your site's front-end - the logic used on wagtaildemo is just an example. In the simplest case, you could customise wagtaildemo's templates/demo/tags/top_menu.html file to hard-code your additional non-page links - any more complex logic than that is up to you.
  • Implementing private pages with real user accounts (as opposed to a single shared password) is on our todo list, but there's no ETA for it yet. In principle it should be possible to do the whole thing in page logic without having to edit wagtail core at all, since each page model has a 'serve' method called on page request which can be overridden with your own logic. However, I'm not sure how far you'd be able to get with Django's login decorators alone - presumably there'd be some extra work in getting it to redirect to your own login page rather than the Wagtail admin one, for example.
  • Not aware of any Firefox performance issues - will investigate.
  • Generally, one page model corresponds to one template, with the template filename being the lower-case/underscore version of the model name. However, it's possible to override this behaviour by redefining the page's get_template method - the default implementation allows for substituting an alternative template for AJAX requests, but you could use the same principle to swap templates according to the page's position in the tree, for example.

@gasman gasman closed this as completed Nov 3, 2014
@dantium
Copy link
Author

dantium commented Nov 3, 2014

Thanks so much for that info! I didn't see the google group before I will use that in future for questions.

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

3 participants