gwarah
gwarah

Reputation: 251

Plone: python script index_html related to a non folder object

I've created a folder in a plone site (4.3.x) and I know it's possible define a python script (default method) index_html that runs on its request:

[plone site]/[folder] --> request --> run index_html default method

The question now: Is there any resource to do the same on another object request in this folder? Something like this:

[plone site]/[folder]/[page] --> request --> run page_html default method

If yes, how could I implement it?

Upvotes: 2

Views: 71

Answers (1)

keul
keul

Reputation: 7819

You can put the Python Script as default view of the content.

Go to /folder/page/manage_propertiesForm and set a layout string property with value page_html.

Please note: this is the old way of doing stuff on Plone. It won't work on Dexterity based contents and Plone 5. Please switch to modern approach using Zope 3 browser views.

Upvotes: 4

Related Questions