Multiple Content Editors in a Page

I'm currently developing a theme for Plone with a tabbed navigation interface within each page. Pages will need to have at least two unique content containers. Is this even possible? How do I achieve this within my index.html and rules files?

You could create a folder, place two pages in it and then use the "all-content"
view. You would then need to use a few Diazo/xslt rules to transform those pages into tabbed pages.

How I'd probably do this in 4.x is use portletpage. You would then redefine one of the portlet managers as representing the whole page (and ignore the rest) and then each portlet represents a single tab.

I think this still results in the text index containing all the text of all the portlets and also should reduce any locking conflicts.

It's not an ideal solution since editors need to know which portletmanager to use. It can be made slightly nicer to use of the portletstyle plugin so that at least you can create a "tabpage" portlet style and then editors can use whatever portlet manager they like.

I'm not sure if collective.cover solves your problem but its worth looking at if it does.

BTW, I'm not 100% this is solving you problem. You mention "two unique content containers" which I don't really understand what you mean. Also your title is "multiple content editors in one page" which seems to imply the problem you might want to solve is around simultaneous access to a document and locking etc?

PS. another way to solve this is to use dexterity content types and schemata with a single richtextfield within each. However that means you have a fixed number of tabs and not way for editors to set the tab name. I'm assuming this that is too restrictive for you usecase?

Also, before someone suggests it, I don't think what you are asking can be solved well with mosaics. But I think its perhaps a good usecase to think about how we can improve mosaics to support it. I added to the mosaics tracker to for that purpose - https://github.com/plone/plone.app.mosaic/issues/170

sorry I forgot to mention that davids solution above is reasonably nice, except with regard to text indexing.

Something that would be nice for someone to invent is a behaviour that allows a folder to act as if all content within it is indexed as part of itself and prevents any subitem being indexed alone.
Then you would create a special dexterity folderish type called "tabbed page" using this behaviour, set it to use "all content view" by default, create your diazo rules and then tell users to add pages which will be turned into new tab.

Sounds like a GSOC project to me*.

*When you've signed up as a GSOC Mentor, everything sounds like a GSOC project.

If you mean like this: http://www.bokstavogbilde.no/bokhandel/boker/hjemmestyrkene :
This was done with several rich text fields (and a repeat loop in the template) (and javascript)

A similar template is used for bda.plone.shop, here https://github.com/bluedynamics/bda.plone.productshop/blob/master/src/bda/plone/productshop/browser/templates/product.pt

As someone pointed out, you can just use styles within a single page, possibly just CSS. No diazo needed I think. Just a series of headers and divs that get turned into a tabbed section.

That's what I have set up currently. Tabs are generated within a page and I use a single content editor to create divs and edit text across all four tabs. However, it is not the ideal solution for my users who want to be able to pick a tab and edit just the information in that tab on a page.

Here is what I am trying to do:
I want the user to have the ability to go into a page, select the Parameters tab (for example) and click 'Edit.' Clicking edit in Plone opens an editor for just the Parameters info on that page.

However currently all of the tab information is in a single box that is divided in the pages source code editor.

Thank you so much for taking the time to help!

I think this could work:
You could add a tupple with a string field and rich text fields , or DataGridField to you content type.

Then each field would have it's own tab ( with JS and CSS)
You would then have to 'add a link to each tab (edit) that only shows if you are logged in)
Clicking this would go to a (normal) edit view for the content, but you could use JS to hide the other fields, so it looks to the user that he is actually editing just the tab.
Or you could customize the edit view, for example by modifying the url and use this 'for which fields to show'
http://site/content_item/edit?showfield=tab1

I did have a similar use case (never finished), but you might get an idea:

… not sure if indexing might be a problem

Your idea of customizing the edit view would probably work. My tabs edit the URL with a #tabname upon click. How could I change the contents of the editor that are visible with that URL? I'm lost when it comes to manipulating Plone elements with URLs/JavaScript.

I think you have several options here.
One that comes to mind is to hide all the fields you dont want (maybe with css, like .nameofeditview .myfield {display: none}
and then in your view show the field by checking the url
maybe this could help (this is not an edit view... but still):


I also think you could 'get the url' in a diazo theme parameter and use that for hiding field in rules.xml
try


(this approach is probably easier)