plomino / Plomino

Powerful and flexible web-based application builder
33 stars 37 forks source link

Iterating over Events content type #813

Open AshRaghav opened 7 years ago

AshRaghav commented 7 years ago

Hi,

Is it possible to obtain all contents of type "Events" and iterate them inside a plomino view or form?

If yes, can someone help me with the snippet to obtain the Events object?

Thanks

AshRaghav commented 7 years ago

@ebrehault - any thoughts on this? Thanks

ebrehault commented 7 years ago

Inside a view it is not possible, but inside a form, yes. You can search the event contents using the portal_catalog: context.getParentDatabase().portal_catalog.searchResults({'portal_type': 'Event'})

and you can iterate over the reuslts to fill in a Datagrid field for instance.

allnode commented 7 years ago

Can you also show a snippet to get to the folder that contains the plomino database to do the search for Event? My Events are contained at the parent folder.

Also, please show how I can search on a specific Event tag.

AshRaghav commented 7 years ago

Thanks Eric. Think that'll not work for my use case. Mainly because, I need the title to link to the individual event but Datagrids will not allow me to have any links like views?