Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do some Zope 3 resources take parameters from the URL?

In Plone 4, I have a custom Dexterity content type that has a NamedBlobFile field called audio_artifact. When using the default edit view to edit the type, I see URLs like this:

enter image description here

What's going on here? I'm familiar with Zope 3 resources in general, but here it looks the widget resource is being passed the @@download view as a parameter. Is that correct? Or am I just confused. I suspect the latter.

like image 998
aclark Avatar asked Dec 20 '22 00:12

aclark


2 Answers

++something++ is a traversal namespace, so it's not a resource per se, ++resource++ is instead another namespace. Namespaces look up custom namespace handlers, which are given the rest of the item name.

In this case the widget namespace handler is given the name of the widget, forms.widgets.audio_artifact, and it will use this to look up that widget on the add form.

@@download is a view on the widget, that enables you to download the file in the widget. For images there is also a view that allows you to get thumbnails etc.

like image 194
Lennart Regebro Avatar answered Jan 31 '23 00:01

Lennart Regebro


++widget++form.widgets.audio_artifact traverses to a widget on the @@edit form, and then @@download is a view of that widget.

like image 32
David Glick Avatar answered Jan 30 '23 22:01

David Glick