#6253 (Multiple menu trees in publisher)
by Luc Saffre · in Developers · assigned to Luc Saffre
Summary
In noi2 we load two different demo doctrees: laundry and synodalworld. And their main menus simply get merged. Actually each of these doctrees needs its own menu tree.
Children
- #6431 (Publisher should also show the about.About page) (by Luc Saffre in Developers assigned to Sharif Mehedi)
Comments
- 1 year ago by Luc Saffre about #6253 (Multiple menu trees in publisher) : Uff I pushed my changes. I think we can consider this ticket as closed now. Though there is more to do in publisher.
- 1 year ago by Luc Saffre about #6253 (Multiple menu trees in publisher) : This changeset is particualily nasty because it requires me to adapt dozens of doctests that had been "wrong" until now and a "right" now. For example the open_help action was rendered in doctests as **ⓘ** until now, but now it is rendered `ⓘ <…>`__ (indicating that it is clickable).
- 1 year ago by Luc Saffre about #6253 (Multiple menu trees in publisher) : Working on this has a side effect: show_urls is now honored also by JS renderers.
- 1 year ago by Luc Saffre in reply to Luc Saffre about #6253 (Multiple menu trees in publisher) : But that's another ticket: #6431 (Publisher should also show the about.About page)
- 1 year ago by Luc Saffre about #6253 (Multiple menu trees in publisher) (1 reply) : TODO: The about.About page is cusrrently visible only when you enter the Admin area. Which is counter-intuitive. We might replace the about.About actor by a technical "About this site" page that exists only with publisher. Lino sites without the publisher plugin are for internal use and actually don...
- 1 year ago by Luc Saffre in reply to Luc Saffre about #6253 (Multiple menu trees in publisher) : The New and the ⓘ buttons come from ar.plain_toolbar_buttons(), and that's correct. But ar.plain_toolbar_buttons() is still a bit simplistic. Actually ar.get_permission() shouldn't return True for ShowInsert because the publisher renderer is readonly. Actually the ⓘ could simply be an a href with tar...
- 1 year ago by Luc Saffre about #6253 (Multiple menu trees in publisher) (1 reply) : TODO: there are still a few silly issues caused by my changes, e.g. the show memo command adds "New ⓘ ⏏" at the end of the heading.
- 1 year ago by Luc Saffre about #6253 (Multiple menu trees in publisher) : And as a consequence it turns out that we don't need the publisher.Tree model at all. The Page model simply has a FK field root_page, which points to another page.
- 1 year ago by Luc Saffre about #6253 (Multiple menu trees in publisher) : I realized that my idea to have each publisher tree have its own set of SpecialPages was wrong. That would be for #5904 (Multiple "user spaces" (or ledgers or systems or communities)). But #6233 (Modifing a grid cell doesn't call before_ui_save()) is less ambitious. A Lino site with multiple publisher trees has only one set of special pages, only calendar, one list of contacts, one list of blogs, etc.
- 1 year ago by Luc Saffre in reply to Luc Saffre about #6253 (Multiple menu trees in publisher) : No it shouldn't be nullable. It's better to be forced to think about it when creating a publishable database row. Making it non nullable reveals that also calEventType and cal.Calendar need to have publisher_tree field.
- 1 year ago by Luc Saffre about #6253 (Multiple menu trees in publisher) (1 reply) : TODO: Should the publisher_tree field be nullable, value None meaning the "main" tree for which there's even no row in publisher.Tree? Of course this is relevant only when with_trees is True.
- 1 year ago by Luc Saffre about #6253 (Multiple menu trees in publisher) : On a site with multiple publisher trees, there must be one instance of every SpecialPage per tree.
- 1 year ago by Luc Saffre about #6253 (Multiple menu trees in publisher) : I'm still missing some piece of the whole picture.
- 1 year ago by Luc Saffre about #6253 (Multiple menu trees in publisher) : Idea: new plugins setting publisher.with_trees. And when this is False there is no field publisher_tree.
- 1 year, 2 months ago by Luc Saffre about #6253 (Multiple menu trees in publisher) : Next step: add a db model to define menu trees. But I let this wait because #6130 (Prima sprint May-July 2025) is more urgent.
- 1 year, 2 months ago by Luc Saffre about #6253 (Multiple menu trees in publisher) : I pushed a little move to prepare this ticket (merge synodalworld and laundry fixtures), move Andy, Bert and Chloe to a separate fixture "abc". The original laundry fixture is now also in lino_book/projects/noi2/fixtures/demo.py but remains in Lino CMS, which we will probably drop soon because it ha...
- 1 year, 2 months ago by Luc Saffre about #6253 (Multiple menu trees in publisher) : Created new Ticket #6253 (Multiple menu trees in publisher).