Scaffolding Roof at Morguefile.com

Plone 4: Viewlets, Content Types

It’s funny what you can unearth even though you may feel like you’ve got a good handle on a particular technology. I only just discovered how portal_setup can (or perhaps should) be used to fix problems with products being installed or uninstalled. Now I’ve found a way to manage the viewlets in a theme.

Manage Viewlets in Plone 4

If you aren’t already aware of the manage-viewlets view, I saw it in one of the great Youtube videos Weblion has put up on editing viewlets.  Add /@@manage-viewlets to your Plone site URL and log in as an admin, and you can quickly move viewlets around or show (and hide) them.  You’ll notice that this is the default Plone 4 Sunburst theme but I’ve been able to slide my global navigation up to the top, and use one of the two breadcrumb paths.  If you are like me and using CSS to block the breadcrumbs (Sunburst has its own ploneCustom.css and you can uncomment this function):

#breadcrumbs-you-are-here,
#breadcrumbs-home,
#breadcrumbs-current,
#breadcrumbs-1 {
display: none;
}

this manage-viewlets view will enable you to cut that out of the CSS file and get better control of your breadcrumbs.

Content Types

I should but do not know where this problem arose, but when I came back to add this post, I couldn’t add any content any longer.  Plone returned an error that it couldn’t find the page I was going to, which was the add content URL.  But it ended with this, which is in the Add View URL (Expression) field in my content type:

/++add++News%20Item

No useful information in the error.  When I looked around, though, I found some references to how to call custom forms – with @@.  It also indicated that Plone would revert to a standard add script if this information was missing.  So I cleared the Add View URL field on my content types, made sure to check the box at the bottom of the type page so that Plone will Fall Back to Default View, and the error disappeared.

Leave a Reply

Your email address will not be published. Required fields are marked *