What ist the best/default implementation for static complex HTML in the content body area

Hello, my situation:
I have two complex HTML structures a slider with panels that contain images an two textitems and i have a list wich shows more informations by mouseover. The condition is, that the normal user should not edit this complex markup in the editor. My Question, what is the best way to provide the markup?

  1. register viewlets for the Section AboveContent and BelowContent and then a Behavior for enabled/disable the Viewlet
  2. a Portlet and then customizing the page per plone.app.mosaic or contentwellportlet addon
  3. plone.outputfilter, in the editor area a placeholder like ##BOX1## and then the transformation to markup
    I hope my Question is clear?
    best regards

The canonical approach is to use viewlets.
But I would recommend to use Rapido which is perfect for those kind of things: https://github.com/plomino/rapido.plone

Thanks, but what is the solution when the block only to be displayed on a single page or a small collection of pages? I think, an outpulfilter is a good choice, but not intuitive. The Szenario is: how can the user enable a box above the content body or below on a page with static content. But a On/Off Behavior in the Edit Form of the page is also a possibility. I'm not so sure.

If you take a look to the Rapido tutorial about the rating system, you can buid a similar solution for your case:

  • the "Like" button would be your "On/off" action
  • the rating display would be your static html

That's quite easy to do and regarding the UI, there is no restriction, you can implement it the way you want.

you could use something as sc.embedder.

Thanks for the tips

I tried this product on Plone 5 and it crashed my site (instance wouldn't start). Buildout appeared to run fine, it found the product (sc.embedder v 1.0b5). After buildout/restart, site wouldn't start. When product removed from buildout and buildout/restart, site started normally.

Looking at the instance.log, the best I can figure out is this is the relevant error:

2016-01-19T17:45:41 INFO Products.PloneFormGen gpg_subprocess initialized, using /usr/bin/gpg

2016-01-19T17:45:44 WARNING plone.behavior Specifying 'for' in behavior 'Dynamic SearchableText indexer behavior' if no 'factory' is given has no effect and is superfluous.

(I can't be certain, but this error came up each time I tried to restart)

This is just a warning. It does not stop anything from working nor can it introduce a regression.

Thanks jensens.
I posted this error on the product github. The author got back to me and said it was explicitly on plone 4.
Too bad. Another good product not available for plone 5

Maybe we should organize a sprint for P5 add-on upgrades... we tried to do this in Bucharest but it was only for about a day and a bit.

1 Like

I think that would be great. I'd be glad to help with user testing and documentation

I think that's a fantastic idea; I'm in...

sc.embedder has CI tests and I have already documented how to fix that specific error, the removal of plone.app.stagingbehavior on Plone 5. you can help by opening a branch and working on it.

I have no resources for that now.